SHARE
TWEET

Untitled

a guest May 19th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class MineFrame extends JFrame implements ActionListener
  2. {
  3.     JPanel gridLayout = new JPanel(new GridLayout(1, 2));
  4.     JPanel flowLayout = new JPanel(new FlowLayout(FlowLayout.RIGHT));
  5.    
  6.     private JButton restart = new JButton("Neustart");
  7.     private JButton close = new JButton("Beenden");
  8.    
  9.     public MineFrame()
  10.     {
  11.         setTitle("Minesweeper");
  12.         setSize(600,800);
  13.         setMinimumSize(new Dimension(600,800));
  14.        
  15.         //Menue menue = new Menue();
  16.         //add(menue);
  17.        
  18. //      BorderLayout hauptFenster = new BorderLayout();
  19. //      this.setLayout(new BorderLayout());
  20.        
  21.         //Verschachteltes Layout für Buttons
  22.         add(BorderLayout.SOUTH, flowLayout);
  23.        
  24.         flowLayout.add(gridLayout);
  25.         gridLayout.add(restart);
  26.         gridLayout.add(close);
  27.        
  28.        
  29.         MinePanel minePanel = new MinePanel(new Spiel());
  30.         add(minePanel);
  31.        
  32.         restart.addActionListener(minePanel);
  33.         close.addActionListener(this);
  34.        
  35.         setVisible(true);
  36.         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  37.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top