提交 8c714fb5 编写于 作者: weixin_50772964's avatar weixin_50772964

Update UI.java

上级 5eaaa2dc
......@@ -5,6 +5,11 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class UI extends JFrame {
JButton jButton1 = new JButton("连接");
......@@ -16,6 +21,7 @@ public class UI extends JFrame {
JTextField jTextField2 = new JTextField();
JTextField jTextField3 = new JTextField();
JPasswordField jPasswordField = new JPasswordField();
localPanel localpanel = new localPanel();
public UI (){
setTitle("ftp软件");
......@@ -44,6 +50,8 @@ public class UI extends JFrame {
jButton2.setBounds(820,20,100,20);
jButton3.setBounds(30,50,90,40);
jButton4.setBounds(170,50,90,40);
localpanel.setBounds(30,110,500,300);
c.add(jLabel1);
......@@ -58,6 +66,7 @@ public class UI extends JFrame {
c.add(jButton2);
c.add(jButton3);
c.add(jButton4);
c.add(localpanel);
setVisible(true);
......@@ -109,7 +118,10 @@ public class UI extends JFrame {
class jButton3event implements ActionListener{
@Override
public void actionPerformed(ActionEvent e) {
//上传操作
String filepath = new String();
filepath = localpanel.getCurrentPath()+"\\"+localpanel.getfile1();
//System.out.println(filepath);
//文件路径为filepath,剩下的代码为上传操作。
}
}
class jButton4event implements ActionListener{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册