Guest User

Untitled

a guest
Jul 16th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. // Kyle McMenomy
  2. import java.awt.*;
  3. import javax.swing.*;
  4. public class GUIBasics {
  5.  
  6.  
  7.  
  8. public static void main(String[] args) {
  9. JFrame frame = new JFrame();
  10. frame.setTitle("Chapter 12");
  11. frame.setSize(500, 400);
  12. frame.setLocationRelativeTo(null);
  13. frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  14. frame.setVisible(true);
  15. frame.setLayout(new GridLayout());
  16. JLabel jlblLabel = new JLabel();
  17. jlblLabel.setText("Welcome");
  18. frame.add(jlblLabel);
  19. JButton jbButton = new JButton("Button Here");
  20. frame.add(jbButton);
  21. frame.add(new JButton("Help"));
  22.  
  23. }
  24.  
  25. }
Add Comment
Please, Sign In to add comment