3 |
|
//---IMPORTS--- |
4 |
|
import javax.swing.*; |
5 |
|
import javax.swing.border.*; |
6 |
– |
import java.awt.Color; |
7 |
– |
import uk.ac.ukc.iscream.util.*; |
8 |
– |
|
6 |
|
import java.awt.*; |
7 |
|
import java.awt.event.*; |
11 |
– |
import java.net.*; |
12 |
– |
import java.io.*; |
13 |
– |
import java.util.Date; |
14 |
– |
import java.text.DateFormat; |
15 |
– |
import java.util.Locale; |
16 |
– |
import java.util.HashMap; |
17 |
– |
import javax.swing.border.*; |
8 |
|
|
9 |
|
/** |
10 |
< |
* NASTY AND BASIC, PLEASE DON'T COMPLAIN |
10 |
> |
* Root for the SwingClient...starts the whole show off... |
11 |
|
* |
12 |
|
* @author $Author$ |
13 |
|
* @version $Id$ |
62 |
|
public void windowClosing(WindowEvent e) {System.exit(0);} |
63 |
|
}); |
64 |
|
|
75 |
– |
|
76 |
– |
// build the frame |
65 |
|
getContentPane().add(control, "North"); |
78 |
– |
getContentPane().add(data, "Center"); |
66 |
|
|
67 |
+ |
JScrollPane scrollPane = new JScrollPane(data); |
68 |
+ |
getContentPane().add(scrollPane, "Center"); |
69 |
+ |
|
70 |
+ |
|
71 |
|
JPanel bottom = new JPanel(); |
72 |
|
bottom.setLayout(new BorderLayout()); |
73 |
|
_messages.setEditable(false); |
116 |
|
public static void addMessage(String message) { |
117 |
|
_messages.insert(message + "\n", 0); |
118 |
|
} |
128 |
– |
//---ATTRIBUTES--- |
119 |
|
|
120 |
+ |
//---ATTRIBUTES--- |
121 |
+ |
|
122 |
+ |
ImageIcon _serverIcon = new ImageIcon("server.gif"); |
123 |
+ |
JLabel _serverCountLabel; |
124 |
+ |
int _serverCount = 0; |
125 |
+ |
|
126 |
+ |
//---STATIC ATTRIBUTES--- |
127 |
+ |
|
128 |
|
static JLabel _controlStatus = new JLabel("Control Link: Disconnected", JLabel.LEFT); |
129 |
|
{ |
130 |
|
_controlStatus.setBorder(new EtchedBorder(EtchedBorder.LOWERED)); |
135 |
|
_dataStatus.setBorder(new EtchedBorder(EtchedBorder.LOWERED)); |
136 |
|
} |
137 |
|
|
138 |
< |
static JLabel _queueStatus = new JLabel("-", JLabel.LEFT); |
138 |
> |
static JLabel _queueStatus = new JLabel(" ", JLabel.LEFT); |
139 |
|
{ |
140 |
|
_queueStatus.setBorder(new EtchedBorder(EtchedBorder.LOWERED)); |
141 |
|
} |
144 |
– |
|
145 |
– |
ImageIcon _serverIcon = new ImageIcon("server.gif"); |
146 |
– |
JLabel _serverCountLabel; |
147 |
– |
int _serverCount = 0; |
142 |
|
static JTextArea _messages = new JTextArea(); |
149 |
– |
|
150 |
– |
//---STATIC ATTRIBUTES--- |
151 |
– |
|
143 |
|
} |