Mercurial > hg > RemoteEditor > REPSessionManager
view test/ConnectionPanel.java @ 375:34642bc65c21
*** empty log message ***
author | kono |
---|---|
date | Wed, 22 Oct 2008 02:59:08 +0900 |
parents | 83790b8b8174 |
children |
line wrap: on
line source
package test; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JPanel; import javax.swing.JTextField; public class ConnectionPanel extends JPanel implements ActionListener{ /** * */ private static final long serialVersionUID = 1L; private JButton button; private JTextField textField; public String host; public ConnectionPanel() { button = new JButton("Connect"); textField = new JTextField("localhost"); button.setBounds(160, 5, 100, 20); textField.setBounds(5, 5, 150, 20); this.setLayout(null); this.add(textField); this.add( button); button.addActionListener(this); } public void actionPerformed(ActionEvent event) { if (event.getSource() == button) { host = textField.getText(); //System.out.println("pressed!"); } } }