Advertisement
Guest User

sharons lungs are black

a guest
May 22nd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. import javax.swing.*;
  2. import java.awt.FlowLayout;
  3. public class Aufg_15_01 extends JFrame{
  4. public static void main (String[] args){
  5. // Hauptfenster erzeugen
  6. new Aufg_15_01("Hauptfenster");
  7. }
  8. public Aufg_15_01(String titel){
  9. super(titel);
  10. setLayout (new FlowLayout());
  11. // Label erzeugen
  12. JLabel label1 = new JLabel ("Hallo Welt!");
  13. // Label dem Hauptfenster hinzufuegen.
  14. add (label1);
  15. // GrรถรŸe des Fensters
  16. setSize (400, 100);
  17. setDefaultCloseOperation(EXIT_ON_CLOSE);
  18. // sichtbar machen
  19. setVisible (true);
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement