Java JTabbedPane Drag and Drop To Window
Posted on 2007-10-08
I'm currently running Java 1.5 on windows xp pro. I'm developing a Java application that uses a JTabbedPane object to allow the user to traverse through different JPanels of the application. I want the user to be able to drag any of the tabs in the JTabbedPane, and if they drag it out of the JFrame window then it creates a new JFrame with the JPanel that was draged out through the tab.
My initial approach is to send the JPanel object through a mouseListener that is attached to the JTabbedPane but I'm not really sure that it would work. If any of you have any ideas, please let me know.