package client; import java.awt.Frame; import java.awt.Dimension; import java.awt.TextArea; import java.awt.Rectangle; import java.awt.Button; import java.awt.Color; import javax.swing.JFrame; public class TelaClient extends Frame { /** * */ private static final long serialVersionUID = 1L; public TextArea displayArea = null; private TextArea inputArea = null; private Button button = null; public Client client; public Controladora controladora; /** * This method initializes * */ public TelaClient() { super(); initialize(); } /** * This method initializes this * */ private void initialize() { this.setLayout(null); this.setSize(new Dimension(585, 323)); this.setResizable(false); this.setTitle("Cliente"); this.setVisible(true); this.add(getDisplayArea(), null); this.add(getInputArea(), null); this.add(getButton(), null); } /** * This method initializes textArea * * @return java.awt.TextArea */ private TextArea getDisplayArea() { if (displayArea == null) { displayArea = new TextArea(); displayArea.setBounds(new Rectangle(13, 30, 558, 214)); displayArea.setBackground(Color.white); } return displayArea; } /** * This method initializes textArea1 * * @return java.awt.TextArea */ private TextArea getInputArea() { if (inputArea == null) { inputArea = new TextArea(); inputArea.setBounds(new Rectangle(14, 249, 497, 64)); inputArea.setBackground(Color.white); } return inputArea; } /** * This method initializes button * * @return java.awt.Button */ private Button getButton() { if (button == null) { button = new Button(); button.setBounds(new Rectangle(516, 250, 54, 61)); button.setLabel("Enviar"); button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { controladora.sendMessage(inputArea.getText()); // TODO Auto-generated Event stub actionPerformed() } }); } return button; } } // @jve:decl-index=0:visual-constraint="10,16"