📄 fistframe.java
字号:
package java_observer;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import javax.swing.JLabel;
public class FistFrame extends JFrame implements updateInterface{
/**
*
*/
private static final long serialVersionUID = 1L;
BorderLayout borderLayout1 = new BorderLayout();
JLabel jLabel1 = new JLabel();
public FistFrame() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
getContentPane().setLayout(borderLayout1);
this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
jLabel1.setText("什么懂懂");
this.getContentPane().add(jLabel1, java.awt.BorderLayout.CENTER);
}
/*
public static void main(String[] args) {
FistFrame ff = new FistFrame();
ff.setSize(200,200);
ff.setVisible(true);
ff.setLocation(300,300);
}
*/
public boolean updateJLable(String Message) {
this.jLabel1.setText(Message);
return true;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -