Hi,
I want to add a small button next to the title of each tabbed pane and
receive user's mouse click event at the small button.
And finally, the selected pane will be removed.
How to add other object, button, into Title part of JTabbedPane ?
Any ideas?
Oscar kind - 28 May 2004 06:06 GMT
> I want to add a small button next to the title of each tabbed pane and
> receive user's mouse click event at the small button.
> And finally, the selected pane will be removed.
>
> How to add other object, button, into Title part of JTabbedPane ?
Given that JTabbedPane doesn't support this, you'll have to subclass it.
Using the source, you can probably add what you want.
Otherwise, you'll have to create the tab's yourself, and add the tabs
using a CardLayout.
Oscar

Signature
Oscar Kind http://home.hccnet.nl/okind/
Software Developer for contact information, see website
PGP Key fingerprint: 91F3 6C72 F465 5E98 C246 61D9 2C32 8E24 097B B4E2
BraileTrail - 28 May 2004 15:10 GMT
>Hi,
>I want to add a small button next to the title of each tabbed pane and
[quoted text clipped - 4 lines]
>
>Any ideas?
You could have a look at the NetBeans 3.6 (or later) source code. They
add a little "x" on the end of each editor tab to close that file. Sorry
but I have *no* idea which part of the code to look at. Maybe you could
try asking on one of the NetBeans mailing lists?
Regards,
BraileTrail
--