📄 client.java~1~
字号:
import java.awt.*;import java.awt.event.*;import java.applet.*;import javax.swing.*;public class Client extends JApplet { private boolean isStandalone = false; //LoginDialog loginDialog=new LoginDialog(); ChatArea chatarea=new ChatArea(); //Get a parameter value public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) : (getParameter(key) != null ? getParameter(key) : def); } //Construct the applet public Client() { } //Initialize the applet public void init() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); //this.setBackground(Color.black); this.getContentPane().add(chatarea); //this.getContentPane().add(loginDialog); // loginDialog.setVisible(true); } //Get Applet information public String getAppletInfo() { return "Applet Information"; } //Get parameter info public String[][] getParameterInfo() { return null; } //static initializer for setting look & feel static { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } catch(Exception e) { } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -