jindu_p.java
来自「这个是朋友作的毕业设计」· Java 代码 · 共 45 行
JAVA
45 行
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 + =
减小字号Ctrl + -
显示快捷键?