Hy,
I have a JPanel within a JFrame. In the menu bar of the frame I have a check button that would show/hide a toolbar within the JPanel.
The toolbar is a JToolBar type and is added in the NORTH region of the layout.
It occupies the whole region but when I try to hide it using
toolbar.setVisible(false);
panel.remove(toolbar);
It will only hide the region of the toolbar that has buttons. The rest of the toolbar is still visible.
Can you tell me what the problem is or do you know of any alternative on how to achieve this?
Also I would like to implement the MigLayout, since it is more flexible. I tried it but I get the same problem.
Best regards,
Ender