-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPaintMainWindow.java
More file actions
56 lines (43 loc) · 1.22 KB
/
Copy pathPaintMainWindow.java
File metadata and controls
56 lines (43 loc) · 1.22 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
//henry bogardus
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import java.awt.Color;
public class PaintMainWindow extends JFrame
{
private static final int FRAME_WIDTH = 600;
private static final int FRAME_HEIGHT = 500;
private PaintMenuBar mMenuBar;
private PaintMainPane mMainPane;
private ShapeManager mShapeManager;
public PaintMainWindow()
{
JFrame frame = new JFrame();
setSize(FRAME_WIDTH, FRAME_HEIGHT);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mMenuBar = new PaintMenuBar(this);
setJMenuBar(mMenuBar);
mMainPane = new PaintMainPane(this);
setContentPane(mMainPane);
mShapeManager = new ShapeManager(this);
this.setBackground(Color.white);
setLocationRelativeTo(null);
}
public ShapeManager getShapeManager()
{
return mShapeManager;
}
public PaintMenuBar getPainMenuBar()
{
return mMenuBar;
}
public PaintMainPane getPaintMainPane()
{
return mMainPane;
}
public void go()
{
setVisible(true);
}
}