• Post Reply Bookmark Topic Watch Topic
  • New Topic

swing tabbed pane alignment  RSS feed

 
joseph corner
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
using swing, is it possible to align tabs to top right of the tabbed pane? That is, not down the right side.

Another question - would it be feasible to subclass JTabbedPane in order to draw tabs over the top of a menu bar or toolbar? The menu bar/toolbar would have left aligned options or buttons, and the tabs of the tabbed pane would be right-aligned at the same y location.

eg.



Thanks,
JC
[ May 19, 2004: Message edited by: joseph corner ]
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You won't be able to just subclass JTabbedPane to do this...

I would look at JMenuBar and JMenu, and see if you could subclass JMenuBar to lay out it's menus differently, and then make a subclass JMenu that draws itself like a tab, and use a CardLayout in the panel below it. Make the JMenu subclass switch cards in the CardLayout rather than popping up a menu.
 
joseph corner
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
That makes sense, I'll look into it. Thanks,
JC
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!