SHARE
TWEET

Untitled

a guest May 12th, 2014 140 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. import java.awt.BorderLayout;
  4. import java.awt.Dimension;
  5. import javax.swing.JFrame;
  6.  
  7.  
  8. public class MainFrame extends JFrame
  9. {
  10.  
  11.         private final static Dimension SIZE = new Dimension(900, 700);
  12.  
  13.         private DrawPanel panel = new DrawPanel();
  14.  
  15.         public MainFrame()
  16.         {
  17.                 setLayout(new BorderLayout());
  18.                 add(panel, BorderLayout.CENTER);
  19.  
  20.                 // add main menu
  21.                 MainMenu topMenu = new MainMenu(this, panel);
  22.                 setJMenuBar(topMenu);
  23.  
  24.                 setPreferredSize(SIZE);
  25.                 setSize(SIZE);
  26.                 setResizable(true);
  27.                 setLocationRelativeTo(null);
  28.                 setDefaultCloseOperation(EXIT_ON_CLOSE);
  29.                 setVisible(true);
  30.         }
  31.  
  32.         public DrawPanel getDrawPanel()
  33.         {
  34.                 return panel;
  35.         }
  36.        
  37.         public static void main(String[] args)
  38.         {
  39.                 new MainFrame();
  40.         }
  41. }
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