-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApplication.java
More file actions
executable file
·44 lines (31 loc) · 1015 Bytes
/
Application.java
File metadata and controls
executable file
·44 lines (31 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import java.awt.*;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Application extends JFrame{
BoardPanel board;
MenuBar menuBar;
EngineInterface eInterface;
public Application(){
eInterface = new EngineInterface();
board = new BoardPanel(eInterface);
eInterface.attatchBoard(board);
menuBar = new MenuBar(eInterface);
getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.X_AXIS));
getContentPane().add(board, "board");
setJMenuBar(menuBar);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
setSize(700,500);
pack();
setVisible(true);
}
public static void main(String[] args) {
SwingUtilities.invokeLater(
new Runnable() {
@Override
public void run() {
new Application();
}
});
}
}