• Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing appearance of Tabbed Pane

 
kevin bennett
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a GUI that uses one JTabbedPane nested within another JTabbedPane. The appearance is a little awkward (the tabbed panes almost look as if they are independent of one another, instead of nested). I would like to change the appearance of the tabs to the way you often see nested tabs on web pages, i.e. like this one - http://www.fool.com/
Can anyone help me with how to do this? Thx.
-Kevin
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you could imitate the nested JTabbedPane with buttons and a CardLayout. you have more possibilities laying out buttons than a JTabbedPane.
you can even create custom buttons that don't look like buttons (or take JLabel and listen to mouse events instead of action events).
or you create your own JNestedTabbedPane. if you have time you might have fun doing that. you would then have to read some source code and documentation concerning UIComponent classes.
or you skip the thing with the tabs and switch to a JTree. this is often seen in the Option Dialogs of editors. take JEdit for example. if you open the Global Options Dialog you have a navigation tree on the left side. ok, that's also used on web sites.
cheers
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!