This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
two panels with cardlayout and jtoolbar always over both panels
sureshksks ks
Greenhorn
Joined: Nov 16, 2012
Posts: 6
posted
0
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
suresh
sureshksks ks
Greenhorn
Joined: Nov 16, 2012
Posts: 6
posted
0
HI Everybody...
I am not getting any replies ....have I asked something which is not answerable...
suresh
Richard Tookey
Ranch Hand
Joined: Aug 27, 2012
Posts: 361
posted
0
Take a look at the Javadoc for CardLayout.next(). Read carefully!
sureshksks ks
Greenhorn
Joined: Nov 16, 2012
Posts: 6
posted
0
can anyone explain with an example
my problem is the toolbar must be displayed at top of all panels. but it couldnot be placed/displayed proerly
Please help.
sureshksks ks
Greenhorn
Joined: Nov 16, 2012
Posts: 6
posted
0
can anyone explain with an example
my problem is the toolbar must be displayed at top of all panels. but it couldnot be placed/displayed proerly
I am searching a solution for this last three weeks
Please help.
Richard Tookey
Ranch Hand
Joined: Aug 27, 2012
Posts: 361
posted
0
sureshksks ks wrote:can anyone explain with an example
my problem is the toolbar must be displayed at top of all panels. but it couldnot be placed/displayed proerly
.
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.