You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Start.java 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 grafik;
  7. import java.awt.Color;
  8. import java.awt.Container;
  9. import javax.swing.JFrame;
  10. import javax.swing.JOptionPane;
  11. import javax.swing.OverlayLayout;
  12. import javax.swing.UIManager;
  13. import javax.swing.WindowConstants;
  14. /**
  15. * Builder Class
  16. * @author chris, hd
  17. */
  18. public class Start
  19. {
  20. public Start()
  21. {
  22. JFrame frm = new JFrame();
  23. Container con = frm.getContentPane();
  24. con.setLayout(new OverlayLayout(con));
  25. con.setBackground(Color.WHITE);
  26. frm.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
  27. // for (int i = 0; i < 100; i++)
  28. // {
  29. // double zufall = Math.random();
  30. // long schlafzeit = (long)(1 + 100*zufall);
  31. // Kreis leinwand = new Kreis(schlafzeit);
  32. // leinwand.setOpaque(false);
  33. // con.add(leinwand);
  34. // leinwand.start();
  35. // }
  36. Gerade gerade = new Gerade(1);
  37. con.add(gerade);
  38. frm.setSize(600, 400);
  39. frm.setVisible(true);
  40. }
  41. /**
  42. * @param args the command line arguments
  43. */
  44. public static void main(String[] args)
  45. {
  46. try
  47. {
  48. UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  49. }
  50. catch (Exception e)
  51. {
  52. JOptionPane.showMessageDialog(null, e.toString());
  53. }
  54. new Start();
  55. }
  56. }