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.3KB

5 years ago
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 garten;
  7. import garten.model.Gaertner;
  8. import garten.view.Fenster;
  9. import garten.view.FlaecheBeet;
  10. import garten.view.FlaechePflanzen;
  11. import garten.view.FlaecheWeg;
  12. import java.awt.Color;
  13. import java.awt.Container;
  14. import javax.swing.OverlayLayout;
  15. /**
  16. * Builder Class
  17. * @author Jan
  18. */
  19. public class start
  20. {
  21. public start()
  22. {
  23. Color hintergrund = new Color(34, 139, 34);
  24. Fenster view = new Fenster();
  25. FlaecheBeet flbeet = new FlaecheBeet();
  26. FlaecheWeg flweg = new FlaecheWeg();
  27. FlaechePflanzen flpflanzen = new FlaechePflanzen();
  28. flpflanzen.setOpaque(false);
  29. flweg.setOpaque(false);
  30. flbeet.setOpaque(false);
  31. Container hauptkiste = view.getContentPane();
  32. hauptkiste.setLayout(new OverlayLayout(hauptkiste));
  33. hauptkiste.setBackground(hintergrund);
  34. hauptkiste.add(flpflanzen);
  35. hauptkiste.add(flbeet);
  36. hauptkiste.add(flweg);
  37. Gaertner ga = new Gaertner(view,flbeet,flweg,flpflanzen);
  38. }
  39. /**
  40. * @param args the command line arguments
  41. */
  42. public static void main(String[] args)
  43. {
  44. new start();
  45. }
  46. }