📄 yarnsystemframe.java
字号:
package yarn;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JToolBar;
import javax.swing.JDesktopPane;
import java.awt.Dimension;
import javax.swing.JButton;
import javax.swing.JMenu;
import javax.swing.JInternalFrame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2006</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class YarnSystemFrame extends JFrame {
JDBCFile jf = null;
BorderLayout borderLayout1 = new BorderLayout();
JMenuBar jMenuBar1 = new JMenuBar();
JToolBar jToolBar1 = new JToolBar();
JDesktopPane jDesktopPane1 = new JDesktopPane();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
JButton jButton3 = new JButton();
JButton jButton4 = new JButton();
JMenu jMenu1 = new JMenu();
JMenu jMenu2 = new JMenu();
JMenu jMenu3 = new JMenu();
JMenu jMenu4 = new JMenu();
public YarnSystemFrame() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
public YarnSystemFrame(JDBCFile jf) {
this.jf = jf;
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
getContentPane().setLayout(borderLayout1);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setSize(new Dimension(980, 720));
this.setJMenuBar(jMenuBar1);
jButton1.setText("jButton1");
jButton1.addActionListener(new YarnSystemFrame_jButton1_actionAdapter(this));
jButton2.setText("jButton2");
jButton2.addActionListener(new YarnSystemFrame_jButton2_actionAdapter(this));
jButton3.setText("jButton3");
jButton4.setText("jButton4");
jMenu1.setText("系统");
jMenu2.setText("出入库");
jMenu3.setText("库存管理");
jMenu4.setText("查询分析");
this.getContentPane().add(jToolBar1, java.awt.BorderLayout.NORTH);
this.getContentPane().add(jDesktopPane1,java.awt.BorderLayout.CENTER);
jDesktopPane1.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
jMenuBar1.add(jMenu1);
jMenuBar1.add(jMenu2);
jMenuBar1.add(jMenu3);
jMenuBar1.add(jMenu4);
jToolBar1.add(jButton1);
jToolBar1.add(jButton2);
jToolBar1.add(jButton3);
jToolBar1.add(jButton4);
}
public static void main(String[] args) {
YarnSystemFrame yarnsystemframe = new YarnSystemFrame();
}
public void jButton1_actionPerformed(ActionEvent e) {
jDesktopPane1.add(new BillInFrame(jf));
}
public void jButton2_actionPerformed(ActionEvent e) {
jDesktopPane1.add(new BillOutFrame(jf));
}
}
class YarnSystemFrame_jButton2_actionAdapter implements ActionListener {
private YarnSystemFrame adaptee;
YarnSystemFrame_jButton2_actionAdapter(YarnSystemFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
class YarnSystemFrame_jButton1_actionAdapter implements ActionListener {
private YarnSystemFrame adaptee;
YarnSystemFrame_jButton1_actionAdapter(YarnSystemFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -