I have a chat client that launches another window when '.play' is sent in. The relevant code follows:
BoardFrame bframe = new BoardFrame();
bframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
bframe.setSize(300,600);
frame.setVisible(false);
bframe.setVisible(true);
BoardPanel bpanel = new BoardPanel();
bpanel.setSize(200,500);
bpanel.setOrientation('v');
bpanel.setBackground(Color.GREEN);
bpanel.paintComponent(bpanel.getGraphics());
bpanel.setVisible(true);
bframe.getContentPane().add(bpanel,"Center");
bframe.pack();
BoardPanel is a class that extends JPanel and BoardFrame is a class that extends JFrame. Frame will be deleted, but for now i just set it to not visible. I just dont want to go messing around in those other classes if the solution is a quick one here.
Also this is my first post on here so please forgive the hideous formatting.