Advertisement
Guest User

Untitled

a guest
Dec 7th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import java.awt.FlowLayout;
  2.  
  3. import javax.swing.JButton;
  4. import javax.swing.JFrame;
  5. import javax.swing.JLabel;
  6.  
  7. public class Esempio11_2 extends JFrame {
  8. private JButton bottone;
  9. private JLabel etichetta;
  10.  
  11. public Esempio11_2(String titolo) {
  12. super(titolo);
  13. bottone = new JButton("Premi qui");
  14. etichetta = new JLabel("Sto aspettando...");
  15. getContentPane().setLayout(new FlowLayout());
  16. getContentPane().add(bottone);
  17. getContentPane().add(etichetta);
  18. setDefaultCloseOperation(EXIT_ON_CLOSE);
  19. setSize(300, 300);
  20. setVisible(true);
  21. }
  22.  
  23. public static void main(String args[]) {
  24. new Esempio11_2("Prova");
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement