sofiaguyang
sofiaguyang

Reputation: 1143

How to make Java tabbed panes display tabs from right to left?

In C#, to make the tabs go from right to left, I set RightToLeft to Yes and RightToLeftFormat to true. How do I do the same thing in Java? How do I set a JTabbedPane's tabs to display from right to left? Please see the image link below to see what I mean by displaying tabs right to left.

http://lh4.ggpht.com/_1bcR6vegNNc/TPDRekNVqWI/AAAAAAAAAB8/TwCqgajEuoI/s640/AdminDashboard.jpg

Upvotes: 1

Views: 2137

Answers (2)

TommyAlf
TommyAlf

Reputation: 31

Then i'm refer from "How to Use Tabbed Panes" to create a new project based by JTabbedPane component...

It's enough to use "setComponentOrientation" method to change orentation of JTabbedPane.

link text

Upvotes: 1

Nikola Kolev
Nikola Kolev

Reputation: 1259

I assume by "tabbed pane" you are referring to javax.swing.JTabbedPane.
To answer your question: AFAIK there is no easy way to do what you want. The BasicTabbedPaneUI(or the TabbedPaneUI which is defined by your application look and feel) which is responsible for painting the tab area of the tabbed pane would require some changes to be able to do what you need.
If you do not have the time to write your own UI, you could look for solutions in the web. I doubt that there would be a ready to use solution to your question though, but then again, who knows? Hope this helps you a bit.

Upvotes: 1

Related Questions