output.java~17~
来自「这个是朋友作的毕业设计」· JAVA~17~ 代码 · 共 45 行
JAVA~17~
45 行
package Resource_Selection;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class output extends JFrame {
JPanel contentPane;
//Construct the frame
public output() {
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);
this.setSize(new Dimension(400, 300));
this.setTitle("输出选择结果");
int i=0;
JLabel jLabel[];
jLabel = new JLabel[10];
i=0;
while(i<Resource_Selection.select.contra2)
{
jLabel[i] = new JLabel();
jLabel[i].setText(Resource_Selection.select.que[i].ip);
jLabel[i].setBounds(new Rectangle(20,10+30*i, 100, 30));
contentPane.add(jLabel[i], null);
i++;
}
}
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
this.dispose();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?