54 lines
1.4 KiB
Java
54 lines
1.4 KiB
Java
/*
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template
|
|
*/
|
|
|
|
package ChatProgramm;
|
|
|
|
import ChatProgramm.controller.CommandController;
|
|
import ChatProgramm.controller.GrafikController;
|
|
import ChatProgramm.model.GrafikModel;
|
|
import ChatProgramm.view.ChatView;
|
|
import ChatProgramm.view.GrafikView;
|
|
import javax.swing.JOptionPane;
|
|
import javax.swing.UIManager;
|
|
|
|
/**
|
|
* Builder Class
|
|
* @author le
|
|
*/
|
|
public class Start
|
|
{
|
|
public Start()
|
|
{
|
|
GrafikModel model = new GrafikModel();
|
|
ChatView view = new ChatView();
|
|
GrafikView zeichenflaeche = view.getGvZeichenflaeche();
|
|
zeichenflaeche.setModel(model);
|
|
|
|
CommandController controller_commands = new CommandController(view);
|
|
controller_commands.registerEvents();
|
|
controller_commands.registerCommands();
|
|
|
|
GrafikController controller = new GrafikController(zeichenflaeche, model, controller_commands);
|
|
controller.registerEvents();
|
|
|
|
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();
|
|
}
|
|
} |