I know this is a simple procedure with JInternalFrame
, but can it be done with a measly JPanel
?
If the tool bar is sitting across one of the sides of the GUI, why try to add the toolbar directly to the JDesktopPane? Why not hold everything in a JPanel that uses BorderLayout, add the JDesktopPane to this JPanel BorderLayout.CENTER and add the toolbar to the JPanel BorderLayout.WHATEVER (depending on where you want to place it)?
Instead of JPanel
for your toolbar, consider JToolBar
in conjunction with Action
. Conveniently, a JToolBar
is detachable on most platforms. There are related examples here and here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With