view test/ConnectionPanel.java @ 324:e235998427a6 before-merge-fix

try to fix merger
author kono
date Sat, 11 Oct 2008 16:31:03 +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!");
		}
	}

}