diff options
Diffstat (limited to 'src/Client/UserInterface.java')
-rw-r--r-- | src/Client/UserInterface.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Client/UserInterface.java b/src/Client/UserInterface.java index fefab23..df56ec3 100644 --- a/src/Client/UserInterface.java +++ b/src/Client/UserInterface.java @@ -29,12 +29,13 @@ public class UserInterface extends JFrame implements ActionListener, KeyListener private JButton connect; private JButton send; - + /**showing your message on the output text area. */ public void outputWriter (String line) { output.append(line + "\n"); } + /**showing the message on the output text area. */ private void msgSendRun () { if (message.getText().equals("")) @@ -47,14 +48,16 @@ public class UserInterface extends JFrame implements ActionListener, KeyListener output.setCaretPosition(output.getText().length()); } + /**sending connection request and and verify it happened only one time */ private void msgConnectRun () { - output.append("You've connect to the server succesufully" + "\n"); + output.append("Connecting..." + "\n"); counterClick++; this.send.setEnabled(true); this.connect.setEnabled(false); } + /** clearing the output*/ public void Clear () { output.setText(""); @@ -105,7 +108,6 @@ public class UserInterface extends JFrame implements ActionListener, KeyListener this.send.setEnabled(false); vertPanel.setLayout(new BoxLayout(vertPanel, BoxLayout.PAGE_AXIS)); - //vertPanel.setMinimumSize(new Dimension(645, 120)); FIXME: Set minimal Size vert panel. Dimension MaximumSize = new Dimension (800 , send.getHeight()); @@ -159,10 +161,10 @@ public class UserInterface extends JFrame implements ActionListener, KeyListener msgConnectRun (); } } - - } + /** Syncing the the action that the event caused to the perform + * @param event key press */ @Override public void keyPressed(KeyEvent e) { @@ -187,6 +189,8 @@ public class UserInterface extends JFrame implements ActionListener, KeyListener } + /** Syncing the the action closing window to the shutdown + * @param event window closing */ public void windowClosing(WindowEvent e) { client.shutdown(); |