package Maze; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JFrame; public class Maze extends JFrame implements ActionListener{ public stats s; public board b; public Battle ba; private boolean combat = true; public static void main(String[] args){ new Maze(); } public void loadBattle(){ System.out.println("loadbattle tested and approved."); } public Maze(){ //Player p = new Player(); JFrame f = new JFrame(); f.setLayout(null); f.setTitle("Maze"); board b = new board(); b.setBounds(0,0,445, 485); f.add(b); stats s = new stats(); s.setBounds(445,0, 180, 485); f.add(s); f.setSize(640,485); f.setLocationRelativeTo(null); f.setVisible(true); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Battle ba = new Battle(); // ba.setBounds(0,0,445, 485); // f.add(ba); } @Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub if (combat == true) b.setVisible(false); else ba.setVisible(true); } }