Phaedrus
Phaedrus

Reputation: 497

How can a drag a tab into a new window with Java Swing?

Is there a way that I can have a tabbed application, where if i drag a tab off the window, it opens that panel in a new frame?

Upvotes: 2

Views: 2048

Answers (1)

javing
javing

Reputation: 12433

Yes it is possible but you will have to post a bit of source code, to see what you have done so far. I found this link that maybe is interesting to you:

http://java-swing-tips.blogspot.com/2008/04/drag-and-drop-tabs-in-jtabbedpane.html

It explain how to drag and drop tabs, maybe you can apply the same principle to your idea.

Also in this forum there is a similar question, maybe you wanna have a look:

How to implement draggable tab using Java Swing?

Upvotes: 2

Related Questions