Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package javaapplication1;
  7.  
  8. import java.awt.*;
  9. import javax.swing.*;
  10. public class JavaApplication1 extends JFrame {
  11.  
  12. /**
  13. * @param args the command line arguments
  14. */
  15. public static void main(String[] args) {
  16. JFrame f = new JFrame("ndrysho ngjyren");
  17. JPanel p = new JPanel();
  18. p.setLayout(new FlowLayout());
  19. JButton button = new JButton();
  20. button.setText("Ok");
  21. button.setText("Off");
  22.  
  23. p.add(button);
  24. f.add(p);
  25. f.setBackground(Color.WHITE);
  26. f.setBackground(Color.WHITE);
  27. f.setSize(200, 300);
  28. f.setLocationRelativeTo(null);
  29. f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  30. f.setVisible(true);
  31. }
  32.  
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement