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 / GUI / July 2005

Tip: Looking for answers? Try searching our database.

JTabbedPane way to unselect all tabs?

Thread view: 
brightoceanlight@hotmail.com - 13 Jul 2005 11:32 GMT
Is there a way to deselect all the tabs, so none of the tabs are
selected in a JTabbedPane?

Also, is there a way to cause the tabs to disappear, so the tabs cannot
be seen at all.

Thanks,

Gil
Steve W. Jackson - 13 Jul 2005 17:31 GMT
> Is there a way to deselect all the tabs, so none of the tabs are
> selected in a JTabbedPane?
[quoted text clipped - 5 lines]
>
> Gil

If there are multiple tabs, then *one* of those tabs *must* be the
active (selected) one.  If there's a JTabbedPane, then its tabs must
appear -- unless you cover it with something else, or (one possibility)
put it into some other layout (maybe CardLayout) that lets you readily
switch between the part with "nothing" on it and the part with your
JTabbedPane.

On the other hand, the questions leads one to wonder if JTabbedPane is
the right component for your needs.  Perhaps you need to revisit your
GUI design.

= Steve =
Signature

Steve W. Jackson
Montgomery, Alabama

brightoceanlight@hotmail.com - 14 Jul 2005 09:23 GMT
Hi Steve,

Thanks for your feedback!

> In article <1121250736.152353.142330@g43g2000cwa.googlegroups.com>,
> If there's a JTabbedPane, then its tabs must
> appear -- unless you cover it with something else,

Can't seem to cover a JTabbedPane with anything else.  I tried to cover
just the tabs with a JPanel but the JPanel would always appear under
the
entire JTabbedPane.

> or (one possibility)
> put it into some other layout (maybe CardLayout) that lets you readily
> switch between the part with "nothing" on it and the part with your
> JTabbedPane.

Hmmm . . . interesting idea

> On the other hand, the questions leads one to wonder if JTabbedPane is
> the right component for your needs.  Perhaps you need to revisit your
> GUI design.

Have been revisiting the GUI design quite a bit and JTabbedPane seems
to make the most sense for the customer.  I just need to think of how
to make it work.

Best,

Gil
Steve W. Jackson - 14 Jul 2005 22:11 GMT
> Hi Steve,
>
[quoted text clipped - 27 lines]
>
> Gil

It still sounds like the JTabbedPane might not be the best component for
your purposes if you need to cover the tabs.

Keep in mind that the idea is to have multiple components, only one of
which is displayed at any given time, and that the user is going to
decide which one to display.  If your GUI is aimed at having several
simultaneous items on display, you don't really want a JTabbedPane.  
Instead, you simply want to design a component with multiple panels that
fit together to produce the desired appearance.

= Steve =
Signature

Steve W. Jackson
Montgomery, Alabama



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.