Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. import javax.swing.SwingUtilities;
  2. import java.awt.BorderLayout;
  3. import javax.swing.JPanel;
  4. import javax.swing.JFrame;
  5.  
  6. public class WindowInformatika extends JFrame {
  7.  
  8. private JPanel jContentPane = null;
  9.  
  10. public static void main(String[] args) {
  11. SwingUtilities.invokeLater(new Runnable() {
  12. public void run() {
  13. WindowInformatika thisClass = new WindowInformatika();
  14. thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  15. thisClass.setVisible(true);
  16. }
  17. });
  18. }
  19.  
  20. /**
  21. * This is the default constructor
  22. */
  23. public WindowInformatika() {
  24. super();
  25. initialize();
  26. }
  27.  
  28. private void initialize() {
  29. this.setSize(600, 400);
  30. this.setContentPane(getJContentPane());
  31. this.setTitle("INFORMATIKA APP");
  32. this.setLocationRelativeTo(null);
  33. }
  34.  
  35. private JPanel getJContentPane() {
  36. if (jContentPane == null) {
  37. jContentPane = new JPanel();
  38. jContentPane.setLayout(new BorderLayout());
  39. }
  40. return jContentPane;
  41. }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement