Hi Experts

Can anyone tell me how i can have aclose button("X" button ) on every tab in a tabbed pane.

So that a user can close the tab by clicking the close button on the tab..Its something like what we see in Eclipse when we create a new Class a Tab gets created with a close button on it..

i think you got my question... Can any one help me in this regard..

[369 byte] By [balaji_ragsa] at [2007-10-3 5:19:53]
# 1
look at the api or tutorial for:remove(Component) removeTabAt(int)Remove the tab corresponding to the specified component or index.
JLuisa at 2007-7-14 23:26:49 > top of Java-index,Desktop,Core GUI APIs...
# 2

google could be very helpful...

http://weblogs.java.net/blog/herkules/archive/2005/10/close_icons_on_1.html

http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/enhancements/

http://forum.java.sun.com/thread.jspa?threadID=760307&messageID=4340748

http://www.javaworld.com/javaworld/jw-09-2004/jw-0906-tabbedpane.html

lfschucka at 2007-7-14 23:26:49 > top of Java-index,Desktop,Core GUI APIs...
# 3

I want to have a button on every tab(tab header) in a tabbed pane so that when i click on the tab header button the tab should be removed or closed.I am able to remove it but how do i place the button with label "X" on a tab header? Can you get my question .....if iam not clear please tell me so that i will try to represent in different way...

balaji_ragsa at 2007-7-14 23:26:49 > top of Java-index,Desktop,Core GUI APIs...
# 4
The links provided tell you how to do this. Did you read them?
hunter9000a at 2007-7-14 23:26:49 > top of Java-index,Desktop,Core GUI APIs...
# 5
Thanks ...... lfschuck i think you got my question.. but it looks quite complicated for a small functionality.
balaji_ragsa at 2007-7-14 23:26:49 > top of Java-index,Desktop,Core GUI APIs...
# 6
FYI, java 6 is supposed to have this functionality built in, so if you can wait until it's released, it will probably be easier.
hunter9000a at 2007-7-14 23:26:49 > top of Java-index,Desktop,Core GUI APIs...