init
This commit is contained in:
parent
6434f90db7
commit
9a8c3d67ee
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/build/
|
||||||
|
/nbproject/private/
|
||||||
|
*.xml
|
||||||
|
*.properties
|
||||||
|
*.mf
|
||||||
|
/dist/
|
70
src/graphicChat/Start.java
Executable file
70
src/graphicChat/Start.java
Executable file
@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* 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 graphicChat;
|
||||||
|
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.WindowConstants;
|
||||||
|
import graphicChat.controller.CommandConnect;
|
||||||
|
import graphicChat.controller.CommandSend;
|
||||||
|
import graphicChat.controller.GraphicsController;
|
||||||
|
import graphicChat.controller.ReceiveAdapter;
|
||||||
|
import graphicChat.view.ChatView;
|
||||||
|
import graphicChat.model.ChatModel;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.UIManager;
|
||||||
|
/**
|
||||||
|
* Builder Class
|
||||||
|
* @author le
|
||||||
|
*/
|
||||||
|
public class Start
|
||||||
|
{
|
||||||
|
public Start()
|
||||||
|
{
|
||||||
|
JFrame frm = new JFrame();
|
||||||
|
frm.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||||
|
|
||||||
|
ChatView view = new ChatView();
|
||||||
|
ChatModel model = new ChatModel();
|
||||||
|
view.getGrafikView1().setModel(model);
|
||||||
|
|
||||||
|
GraphicsController controller = new GraphicsController(view.getGrafikView1(), model);
|
||||||
|
controller.registerEvents();
|
||||||
|
|
||||||
|
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);
|
||||||
|
view.setVisible(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param args the command line arguments
|
||||||
|
*/
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
JOptionPane.showMessageDialog(null, ex.toString());
|
||||||
|
}
|
||||||
|
new Start();
|
||||||
|
new Start();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user