Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / May 2004

Tip: Looking for answers? Try searching our database.

How to add a button next to title at the JTabbedPane

Thread view: 
steve - 28 May 2004 00:53 GMT
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
--


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.