Java JTabbedPane Drag and Drop To Window

Posted on 2007-10-08
Last Modified: 2008-09-01
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.
Question by:vferreira71
    1 Comment
    LVL 26

    Accepted Solution

    I would suggest you that you take the data model from the original panel and pass to the DnD handler, the handler would reconstruct the panel and set the data model to that.

    your approach of sending the panel object won't work since the same instance of UI component can not be displayed two places!

    Featured Post

    Are your corporate email signatures appalling?

    Is it scary how unprofessional your email signatures look? Do users create their own terrible designs and give themselves stupid job titles? You can make this a lot easier for yourself by choosing an email signature management solution from Exclaimer today.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Java 1603 Error 2 27
    maven java path setting 5 32
    word0 challenge 3 31
    autoit - check if option is checked in another program 2 31
    Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    The viewer will learn how to implement Singleton Design Pattern in Java.
    With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now