Guest User

Untitled

a guest
Jun 22nd, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. import javax.swing.*;
  2.  
  3. public class TestFrame {
  4.  
  5. public static void main(String[] args) {
  6.  
  7. JFrame frame = new JFrame();
  8. frame.setSize(550, 350);
  9. frame.setTitle("Testframe");
  10. frame.setVisible(true);
  11.  
  12. frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
  13.  
  14. JPanel panelText = new JPanel();
  15. frame.add(panelText);
  16. JPanel panelButtons = new JPanel();
  17. frame.add(panelButtons);
  18. JButton buttonStart = new JButton("Start");
  19. JButton buttonEnd = new JButton("Beenden");
  20. panelButtons.add(buttonStart);
  21. panelButtons.add(buttonEnd);
  22.  
  23. }
  24. }
Add Comment
Please, Sign In to add comment