Guest User

Untitled

a guest
Apr 25th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. ### From the class which calls the gui: ###
  2.  
  3. public static void main(String[] args) {
  4. // TODO code application logic here
  5. try{gui2 mywindow = new gui2();
  6. mywindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  7. mywindow.setLayout(new BorderLayout());
  8. mywindow.setSize(800,800);
  9. mywindow.pack();
  10. mywindow.setVisible(true);
  11. //mywindow.setResizable(false);
  12. }
  13. catch(Exception e){}
  14. }
  15.  
  16. ########################
  17.  
  18. ### From gui2: ###
  19.  
  20. public class gui2 extends JFrame {
  21.  
  22. ...
  23.  
  24. public gui2() throws IOException {
  25. ...
  26. containerSouth = new JPanel();
  27. containerCenter = new JPanel();
  28. containerEast = new JPanel();
  29. containerNorth = new JPanel();
  30.  
  31. ...
  32.  
  33. setVisible(true);
  34.  
  35. pack();
  36. }
Add Comment
Please, Sign In to add comment