Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTabbedPane - Tab Reordering

 
Krysty Sullivan
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a Tab in JTabbedPane be dragged and dropped to reorder/rearrange Tabs?
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic