📄 frame1.java
字号:
import java.awt.*;
import javax.swing.JFrame;
import com.borland.jbcl.layout.XYLayout;
import com.borland.jbcl.layout.*;
import javax.swing.JButton;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JTextArea;
import javax.swing.JPanel;
import example.*;
import traffic.*;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class Frame1 extends JFrame {
XYLayout xYLayout1 = new XYLayout();
JButton jButton1 = new JButton();
public static final int DEFAULT_WIDTH=700;
public static final int DEFAULT_HEIGHT=700;
NotHelloWorldPanel jPanel1 = new NotHelloWorldPanel();
XYLayout xYLayout2 = new XYLayout();
Master a;
public Frame1() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
getContentPane().setLayout(xYLayout1);
setTitle("Traffic");
setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT);
jButton1.setText("start");
jButton1.addActionListener(new Frame1_jButton1_actionAdapter(this));
jPanel1.setLayout(xYLayout2);
jPanel1.setBackground(Color.yellow);
jPanel1.initialMap();
a=new Master(this.jPanel1);
xYLayout1.setWidth(706);
xYLayout1.setHeight(675);
this.getContentPane().add(jButton1, new XYConstraints(268, 622, -1, -1));
this.getContentPane().add(jPanel1, new XYConstraints( -2, 3, 682, 615));
}
public void jButton1_actionPerformed(ActionEvent e) {
a.process();
}
}
class Frame1_jButton1_actionAdapter implements ActionListener {
private Frame1 adaptee;
Frame1_jButton1_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -