|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
- package netz;
-
-
- import java.io.IOException;
- import java.net.MalformedURLException;
- import javax.swing.JFrame;
- import javax.swing.WindowConstants;
- import netz.controller.ReceiveAdapter;
- import netz.controller.CommandConnect;
- import netz.controller.CommandSend;
- import netz.model.ChatModel;
- import netz.view.ChatView;
- import java.util.logging.Logger;
- import javax.swing.JOptionPane;
- import javax.swing.UIManager;
- import ohmlogger.OhmLogger;
-
-
- /**
- * Builder Class
- * @author chris, hd
- */
- public class Start
- {
- private static Logger lg = OhmLogger.getLogger();
-
- public Start()
- {
-
- JFrame frm = new JFrame();
- frm.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
-
- ChatView view = new ChatView();
- ChatModel model = new ChatModel();
-
- CommandConnect cmdConnect = new CommandConnect(view, model);
- cmdConnect.registerEvents();
-
- CommandSend cmdSend = new CommandSend(view, model);
- cmdSend.registerEvents();
-
- ReceiveAdapter recAdapter = new ReceiveAdapter(view, model);
- recAdapter.subscribe();
-
- view.setVisible(true);
- view.setTitle("Chat");
-
- view.setSize(800, 600);
-
- }
-
- public static void main(String[] args)
- {
- try
- {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- }
- catch (Exception ex)
- {
- JOptionPane.showMessageDialog(null, ex.toString());
- }
- new Start();
-
- }
- }
|