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.
Printable View
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.
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.