comparison src/treeVnc/TextBoxProxy.java @ 22:24112133a0d9

add conf.txt src/treeVnc/ConfFileReader.java
author Yu Taninari <you@cr.ie.u-ryukyu.ac.jp>
date Fri, 20 Jan 2012 16:06:49 +0900
parents 810c53d66376
children
comparison
equal deleted inserted replaced
21:810c53d66376 22:24112133a0d9
74 74
75 private void setText() { 75 private void setText() {
76 panel = new JPanel(); 76 panel = new JPanel();
77 t1 = new TextField("localhost", 30); 77 t1 = new TextField("localhost", 30);
78 t2 = new TextField("5900", 5); 78 t2 = new TextField("5900", 5);
79 pw = new JPasswordField("Password",30); 79 // pw = new JPasswordField("Password",30);
80 button = new JButton("Connect"); 80 button = new JButton("Connect");
81 panel.add(t1); 81 panel.add(t1);
82 panel.add(t2); 82 panel.add(t2);
83 panel.add(pw); 83 // panel.add(pw);
84 panel.add(button); 84 panel.add(button);
85 button.addActionListener(this); 85 button.addActionListener(this);
86 label = new JLabel(); 86 label = new JLabel();
87 Container contentPane = getContentPane(); 87 Container contentPane = getContentPane();
88 contentPane.add(panel, BorderLayout.CENTER); 88 contentPane.add(panel, BorderLayout.CENTER);
101 } 101 }
102 public String getPort() { 102 public String getPort() {
103 return t2.getText(); 103 return t2.getText();
104 } 104 }
105 105
106
106 public String getPassword() { 107 public String getPassword() {
107 return String.valueOf(pw.getPassword()); 108 return String.valueOf(pw.getPassword());
108 } 109 }
110
109 111
110 public void actionPerformed(ActionEvent e) { 112 public void actionPerformed(ActionEvent e) {
111 if(e.getSource()==button) { 113 if(e.getSource()==button) {
112 flag = true; 114 flag = true;
113 setVisible(false); 115 setVisible(false);