File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes How to place an individual tab to the right hand side in a TabbedPane? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to place an individual tab to the right hand side in a TabbedPane?" Watch "How to place an individual tab to the right hand side in a TabbedPane?" New topic
Author

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

Santhosh Raj
Greenhorn

Joined: Mar 08, 2012
Posts: 25
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

Joined: May 03, 2008
Posts: 4522
    
    5

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).


luck, db
There are no new questions, but there may be new answers.
Santhosh Raj
Greenhorn

Joined: Mar 08, 2012
Posts: 25
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

Joined: May 03, 2008
Posts: 4522
    
    5

Not in the API, no.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4522
    
    5

Here's a way to fake it using two JTabbedPanes.
Santhosh Raj
Greenhorn

Joined: Mar 08, 2012
Posts: 25
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

Joined: May 03, 2008
Posts: 4522
    
    5

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

You already did, which is the right thing to do.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to place an individual tab to the right hand side in a TabbedPane?
 
Similar Threads
error in build path
error in build path
How to place the Tab in JTabbedPane on the right hand side of the tabbedpane
XML - Jelly issue
JTabbedPane