• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic