1

I know the title is very similar to this question, but I think it is different. I am not asking how to change order in IDE when I development/design, actually I want to do 'drag and drop' the tabs when my SWING application is running. Is it possible?

If it is not possible, I am thinking about adding 2 buttons on each member JPanel to move this tab back/forward. Now the question is, when I click a tab(say no.4 of 7 tabs), then I click the button on this chosen panel to move itself, how can I keep it 'focused' like no.4 penal is always shown even I call some method to re-organize the tabs?

Community
  • 1
  • 1
user462872
  • 323
  • 1
  • 4
  • 14

1 Answers1

0

You will need to implement Drag and Drop functionality on the Tab components. Oracle has a tutorial on the implementation of Drag-and-Drop, and I recommend visiting the following page to see a discussion with examples for how this can be implemented: How to implement draggable tab using Java Swing?

Community
  • 1
  • 1
copeg
  • 8,290
  • 19
  • 28