Posted By:
Diego_Cimarosa
Posted On:
Thursday, August 3, 2006 07:03 AM
Good morning all I'm quit new to Java world and I'm trying to develop a Java application using NetBeans 5.0 that uses many JPanels. I have a JFrame class, MainFrame, with a JMenu component. Item "A" should launch panelA_00, item "B" should launch panelB_00. Both panelA_00 and panelB_00 have many components that perform data-base logic and four buttons each: "First","Previous","Next" and "Last". Each "Next" button should launch the next panel in chain with this schema: "Item A"->panelA_00->"Next"->panelA_01 ... And, of course, "Previous" button goes back on
More>>
Good morning all
I'm quit new to Java world and I'm trying to develop a Java application using NetBeans 5.0 that uses many JPanels.
I have a JFrame class, MainFrame, with a JMenu component.
Item "A" should launch panelA_00, item "B" should launch panelB_00.
Both panelA_00 and panelB_00 have many components that perform data-base logic
and four buttons each: "First","Previous","Next" and "Last".
Each "Next" button should launch the next panel in chain
with this schema: "Item A"->panelA_00->"Next"->panelA_01 ...
And, of course, "Previous" button goes back one panel.
I'm not able to complete this :
public class MainFrame extends javax.swing.JFrame {
...
private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
panelA_00 page = new panelA_00();
page.setVisible(true);
.... WHAT TO DO ... HERE ?
}
I have tried :
this.getContentPane().add(page);
and many other tries ... but nothings happens ...
I want "simply", replacing the pane with a new panel at every button clik.
PLEASE HELP !
Thanks all for any suggestion.
<<Less