I am wriing a program in java using netbeans in which two panels in cardlayout over which a toolbar always over both these panels. I can use the same buttons in the toolbar for controlliong both panels. In other words If I swich to other panel i could see the same toolbar at the same place and use the same components in the toolbar. I could not find a solution . Please help. If there any other way please also explain.
Thanks in advance
Joined: Nov 16, 2012
I am not getting any replies ....have I asked something which is not answerable...
You seem to need a JPanel with a BorderLayout that has two children. In the NORTH position you need to place the toolbar and in the CENTRE position you need to place a second Panel that has a CardLayout. Into this second panel you place your alternate panels. I suspect the first panel should be used as the content pane of your JFrame.