• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

swing tabbed pane alignment

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
That makes sense, I'll look into it. Thanks,
JC
reply
    Bookmark Topic Watch Topic
  • New Topic