Guest User

Untitled

a guest
Mar 24th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. class cMario extends JFrame
  2. {
  3. public cMario()
  4. {
  5. Container cp = this.getContentPane();
  6. JPanel jp1 = new JPanel();
  7. jp jp2 = new jp();
  8. JLabel jLab1;
  9.  
  10. jLab1 = new JLabel(new ImageIcon("J0301A.gif"));
  11.  
  12. jp1.add(jLab1);
  13.  
  14. cp.add(jp1, BorderLayout.CENTER);
  15. cp.add(jp2, BorderLayout.NORTH);
  16.  
  17. this.setTitle("Super Mario Paint");
  18. this.pack();
  19. //this.setSize(600,400);
  20. this.setLocationRelativeTo(null);
  21. this.setVisible(true);
  22. setDefaultCloseOperation(EXIT_ON_CLOSE);
  23.  
  24. }
  25. }
Add Comment
Please, Sign In to add comment