📄 jindu_p.java
字号:
package Resource_Selection;import java.awt.*;import java.awt.event.*;import javax.swing.*;public class jindu_p extends JFrame { JPanel contentPane; Label label1 = new Label(); //Construct the frame public jindu_p() { enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { contentPane = (JPanel) this.getContentPane(); contentPane.setLayout(null); label1.setText(""); label1.setBounds(new Rectangle(56, 33, 168, 27)); this.setSize(new Dimension(301, 105)); this.setTitle("%"); contentPane.add(label1, null); } public void set_p(int a){ this.setTitle(Integer.toString(a)+"%"); label1.setText("已完成"+Integer.toString(a)+"%..."); } public void jindu_close(){ this.dispose(); } //Overridden so we can exit when window is closed Integer.toString(a)+"%" protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -