⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 client.java

📁 网络聊天
💻 JAVA
字号:
import java.awt.*;
import java.awt.event.*;
import java.rmi.*;
import java.rmi.server.*;

public class Client extends Frame implements ActionListener,KeyListener,Notifiable{

	
		 int flag = 0;
		 String s ;
		 String userName;
		 String welcome;
		 String input;
		 TextArea textArea;
		 TextField inputText;
		 Label hellow;
	
	RemoteInterface server;
	public Client(){
		
		addWindowListener(new WindowAdapter(){
			public void windowClosing(WindowEvent e){
				System.exit(0);
				}	
			});
		
		Panel up = new Panel();
		Panel down = new Panel();
		this.add(up,BorderLayout.NORTH);
		this .add(down,BorderLayout.SOUTH);
		welcome = "hellow,welcome !";
		hellow = new Label(welcome);
		textArea = new TextArea(s,15,50,TextArea.SCROLLBARS_BOTH);
		textArea.setEditable(false);
		up.add(hellow,BorderLayout.NORTH);
		up.add(textArea,BorderLayout.SOUTH);
		
		
		inputText = new TextField(35);
		Button send = new Button("send");
		down.setBackground(Color.pink);
		down.add(inputText);
		down.add(send);
		
		
		
		
		}

	
	public static void main(String[] args) {
		

	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -