Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How do dockable Frames (as an eclipse UI views)

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Thanked 0 Times in 0 Posts

    Post How do dockable Frames (as an eclipse UI views)

    Hi all, help me with desktop App. How do I make frames (in my case InternalFrames) dock (dockable) at the edges of the application as an eclipse views, is there a way to do it by swing (JInternalFrame).
    Thanks an advance.

  2. #2
    Join Date
    Sep 2011
    United States
    My Mood
    Thanked 6 Times in 5 Posts

    Default Re: How do dockable Frames (as an eclipse UI views)

    Assuming you don't want to use a third party library to handle the docking procedure, yes it can be done. Off the top of my head I can think of a few things you would have to do.

    1. Create a custom class that extends JInternalFrame and add variables/methods to it for handling docking.

    2. Create a custom class that extends JDesktopPane which would hold the custom JInternalFrame and contain variables/methods for setting/moving dockable areas.

    3. You would need to keep track of mouse button down/up and mouse movement to recognize if a dockable frame has been selected and whether or not the mouse is over a dockable area.

    To surmise, it is definitely possible to do if you are willing to put forth the effort and are ready for a few headaches along the way. If, however, this seems like too much of a chore then I would definitely go with a third-party library.

Similar Threads

  1. Frames - Using and creating (+another question)
    By 12sea21 in forum What's Wrong With My Code?
    Replies: 10
    Last Post: September 1st, 2011, 01:24 AM
  2. Creating subsequent frames in java with Jframe
    By bondage in forum AWT / Java Swing
    Replies: 3
    Last Post: April 11th, 2011, 07:28 AM
  3. Switching between frames from a seperate class
    By kurt-hardy in forum AWT / Java Swing
    Replies: 4
    Last Post: February 14th, 2011, 04:19 AM
  4. GIF frames
    By vsector in forum AWT / Java Swing
    Replies: 0
    Last Post: April 15th, 2010, 05:25 PM