importjava.awt.*;importjavax.swing.*;publicclassTransAndChatextendsJFrame{privateJLabeljla=newJLabel("用户名");;privateJLabeljlb=newJLabel("主机名");privateJLabeljlc=newJ...
import java.awt.*;
import javax.swing.*;
public class TransAndChat extends JFrame
{
private JLabel jla=new JLabel("用户名");;
private JLabel jlb=new JLabel("主机名");
private JLabel jlc=new JLabel("IP地址");;
JPanel jpList;
JScrollPane jsp=new JScrollPane(jpList);
public TransAndChat()
{
//界面
this.setLayout(null);
jla.setBounds(30,20,40,40);
this.add(jla);
jlb.setBounds(90,20,40,40);
this.add(jlb);
jlc.setBounds(150,20,40,40);
this.add(jlc);
JPanel jpList=new JPanel();
jsp.setBounds(5,20,280,150);
jpList.setBackground(Color.blue);
this.add(jsp);
this.setTitle("Java局域网文件传输器");
this.setBounds(100,100,300,400);
this.setBackground(Color.blue);
this.setVisible(true);
}
public static void main(String[] args)
{
new TransAndChat();
}
}
展开