File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Santhosh Raj
Greenhorn
Posts: 25
  • 0
  • 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.
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • 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
  • 0
  • 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: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not in the API, no.
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 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
  • 0
  • 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: 5115
11
Java Netbeans IDE Opera
  • 0
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic