diff src/main/java/ac/ryukyu/treevnc/client/TextBoxClient.java @ 2:dca3bd61b830

before change MyVncClient.java
author Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
date Mon, 09 Jul 2012 18:47:33 +0900
parents 75b54fd9e73a
children
line wrap: on
line diff
--- a/src/main/java/ac/ryukyu/treevnc/client/TextBoxClient.java	Tue Jul 03 13:34:43 2012 +0900
+++ b/src/main/java/ac/ryukyu/treevnc/client/TextBoxClient.java	Mon Jul 09 18:47:33 2012 +0900
@@ -38,6 +38,7 @@
 	public void ipRegister() {
 		setSize();
 		setText();
+		setButton();
 		visible();
 	}
 
@@ -47,7 +48,7 @@
 		height = (d.getHeight() / 2);
 	}
 
-	void visible() {
+	public void visible() {
 		Point point = new Point();
 		point.setLocation(width - 250, height - 80);
 		setLocation(point.getLocation());
@@ -59,20 +60,20 @@
 		setVisible(false);
 	}
 
-	private void setText() {
+	private  void setText() {
 		t1 = new TextField("Address", 30);
 		t2 = new TextField("5999", 5);
 		panel.add(t1);
 		panel.add(t2);
-		panel.add(button);
-		button.addActionListener(this);
+		//panel.add(button);
+		//button.addActionListener(this);
 		label = new JLabel();
 		Container contentPane = getContentPane();
 		contentPane.add(panel, BorderLayout.CENTER);
 		contentPane.add(label, BorderLayout.SOUTH);
 	}
 
-	void checkBox(String str) {
+	public void checkBox(String str) {
 		// CheckboxGroup ch = new CheckboxGroup();
 		if (counter == 0)
 			check[counter] = new Checkbox(str, true, ch);
@@ -147,6 +148,7 @@
 	}
 
 	public void actionPerformed(ActionEvent e) {
+		System.out.println("Action");
 		flag = true;
 		for (int t = 0; t < counter; t++) {
 			if (check[t].getState()) {