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

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package grafikchat;
  2. import grafikchat.controller.ConnectController;
  3. import grafikchat.controller.GrafikController;
  4. import grafikchat.controller.ReceiveAdapter;
  5. import grafikchat.model.ChatModel;
  6. import grafikchat.view.ChatView;
  7. /**
  8. * Start class, start chat application
  9. *
  10. * @author marian
  11. */
  12. public class Start {
  13. public Start()
  14. {
  15. ChatView view = new ChatView();
  16. ChatModel model = new ChatModel();
  17. view.getGvDrawPane().setModel(model);
  18. ConnectController controllerConnect = new ConnectController(model, view);
  19. controllerConnect.registerEvents();
  20. GrafikController controller = new GrafikController(view, model);
  21. controller.registerEvents();
  22. ReceiveAdapter rxAdapter = new ReceiveAdapter(view);
  23. model.addObserver(rxAdapter);
  24. view.setTitle("Chat");
  25. view.setVisible(true);
  26. }
  27. /**
  28. * @param args the command line arguments
  29. */
  30. public static void main(String[] args)
  31. {
  32. Start start = new Start();
  33. }
  34. }