?? clientapp.java
字號:
import java.awt.BorderLayout;
import javax.swing.JFrame;
public class ClientApp extends JFrame
{
private String host;
private int port;
//構造
public ClientApp(String host,String port)
{
this.host= host;
this.port= Integer.parseInt(port);
setLayout (new BorderLayout());
add("Center",new Client(this.host,this.port));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(300,400);
setVisible(true);
}
public static void main(String args[])
{
if(args.length==2)
{
ClientApp ca = new ClientApp(args[0],args[1]);
}
else
{
System.out.println("Useage: Java ClientApp IP Port");
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -