aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTabbedPane - Tab Reordering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTabbedPane - Tab Reordering" Watch "JTabbedPane - Tab Reordering" New topic
Author

JTabbedPane - Tab Reordering

Krysty Sullivan
Ranch Hand

Joined: Jun 06, 2002
Posts: 48
Can a Tab in JTabbedPane be dragged and dropped to reorder/rearrange Tabs?
Rachel Swailes
Ranch Hand

Joined: May 18, 2004
Posts: 434
Hi there

I looked into this a while ago. Unfortunatly JTabbedPane doesn't support this and we couldn't find any good ready made components to suit our needs.

In the end we wrote a custom component that listens for mouse clicks on the tab and then waits for the mouse released action to reorder the tabs.

Cheers,
Rachel
Krysty Sullivan
Ranch Hand

Joined: Jun 06, 2002
Posts: 48
Hi Rachel!

Thanks for replying. I also wrote a custom component to listen to mouse press/drag and release but I couldn't seem to copy/move the content of the tab I'm trying to drag and drop (I made use of TransferHandler). May I know what you used to drag and drop the tab content itself? Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTabbedPane - Tab Reordering
 
Similar Threads
Adding java programs into JFrame
Getting the size of a tab in a JTabbedPane
retrieving values from JTabbedPane
How to place the Tab in JTabbedPane on the right hand side of the tabbedpane
How do I create a JTabbedPane with editable tab labels