• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to place an individual tab to the right hand side in a TabbedPane?

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to implement a tabbed pane with 4 tabs.
The first 3 tabs being standard, starting from left, but I need the 4th tab to the extreme right hand side like an odd man out.
Please help me with your ideas.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll have to write your own TabbedPaneUI for that, possibly extending BasicTabbedPaneUI or MetalTabbedPaneUI (or the UI delegate associated with whatever LaF you use).
 
Santhosh Raj
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I am already using the Synth PLAF for my skinning.
So is there any other alternative to set aside the 4th tab?
 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not in the API, no.
 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a way to fake it using two JTabbedPanes.
 
Santhosh Raj
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wonderful Darryl Burke !!
thanks for your help and appreciate it..
I have one more Q regarding tabbedpane itself.. can I ask here or should I raise a separate Q for that?
 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Santhosh Raj wrote:should I raise a separate Q for that?


You already did, which is the right thing to do.
 
Happily living in the valley of the dried frogs with a few tiny ads.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic