1 |
|
//---PACKAGE DECLARATION--- |
2 |
< |
package uk.ac.ukc.iscream.conient; |
2 |
> |
package uk.org.iscream.conient; |
3 |
|
|
4 |
|
//---IMPORTS--- |
5 |
|
import javax.swing.*; |
28 |
|
/** |
29 |
|
* The initial width of the window |
30 |
|
*/ |
31 |
< |
private final int DEFAULT_WIDTH = 600; |
31 |
> |
private final int DEFAULT_WIDTH = 700; |
32 |
|
|
33 |
|
/** |
34 |
|
* The initial height of the window |
98 |
|
/** |
99 |
|
* Creates a new Swing Client Frame |
100 |
|
*/ |
101 |
< |
private Conient(JPanel data, JPanel control) { |
101 |
> |
private Conient(JPanel data, ControlPanel control) { |
102 |
|
// set up the Frame |
103 |
|
super("Conient {an i-scream Client}"); |
104 |
|
setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); |
105 |
< |
|
105 |
> |
setJMenuBar(control.getMenuBar()); |
106 |
> |
|
107 |
|
// set what happens when the X in the corner is clicked |
108 |
|
addWindowListener(new WindowAdapter() { |
109 |
|
public void windowClosing(WindowEvent e) {System.exit(0);} |
138 |
|
getContentPane().add(bottom, "South"); |
139 |
|
|
140 |
|
// a nice icon for the window |
141 |
< |
setIconImage((new ImageIcon("./uk/ac/ukc/iscream/conient/server.gif")).getImage()); |
141 |
> |
setIconImage((new ImageIcon("./resources/server.gif")).getImage()); |
142 |
|
|
143 |
|
// and just because we can, a silly splash screen |
144 |
|
// of the dudes that did this funky gibble |
260 |
|
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); |
261 |
|
JPanel splash = new JPanel(); |
262 |
|
splash.setBackground(Color.black); |
263 |
< |
JLabel image = new JLabel((new ImageIcon("./uk/ac/ukc/iscream/conient/i-scream-splash.gif"))); |
263 |
> |
JLabel image = new JLabel((new ImageIcon("./resources/i-scream-splash.gif"))); |
264 |
|
splash.add(image); |
265 |
|
setContentPane(splash); |
266 |
|
Dimension screen = getToolkit().getScreenSize(); |