Im trying to create a menu system using Jframe, but the trouble is how do i get additional JFrames, i.e. forms, to appear when selecting certain options. I want at least several forms to appear (in a neat order) according to certain buttons the user presses. I know i would have to create a Jframe class, and have each form as a different constructor within this class, but then how would i tie it all together in main?
public class myFrameDemo { public static void main(String[] argx) { myFrame w1 = new myFrame(); w1.setVisible(true); myFrame w2 = new myFrame(); w2.setVisible(false);
}
}
class myFrame extends JFrame implements ActionListener {
public static final int WIDTH = 600; public static final int HEIGHT = 300; private Container c; private JPanel north, east, south, west; private JButton button1;