📄 xiajijiemian.java~36~
字号:
package mysystem;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import mysystem.Face;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.JTextField;
import java.awt.Dimension;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import java.awt.Color;
import java.awt.Font;
import javax.swing.JButton;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.Point;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class xiajijiemian extends JPanel {
Face main;
public xiajijiemian(Face h) {
try {
main=h;
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setLayout(null);
setSize(new Dimension(650,488 ));
jLabel1.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 15));
jLabel1.setForeground(Color.magenta);
jLabel1.setText("机器号");
jLabel1.setBounds(new Rectangle(30, 80, 130, 30));
jLabel2.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 15));
jLabel2.setForeground(Color.magenta);
jLabel2.setText("卡号");
jLabel2.setBounds(new Rectangle(30, 120, 130, 30));
jLabel3.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 15));
jLabel3.setForeground(Color.magenta);
jLabel3.setText("上机时间");
jLabel3.setBounds(new Rectangle(30, 160, 130, 30));
jLabel4.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 15));
jLabel4.setForeground(Color.magenta);
jLabel4.setText("下机时间");
jLabel4.setBounds(new Rectangle(30, 200, 130, 30));
jLabel5.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 15));
jLabel5.setForeground(Color.magenta);
jLabel5.setText("本次消费");
jLabel5.setBounds(new Rectangle(30, 240, 130, 30));
jLabel7.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 15));
jLabel7.setForeground(Color.magenta);
jLabel7.setText("");
jLabel7.setBounds(new Rectangle(110, 80, 130, 30));
jLabel8.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 15));
jLabel8.setForeground(Color.magenta);
jLabel8.setText("");
jLabel8.setBounds(new Rectangle(110, 120, 130, 30));
jLabel9.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 20));
jLabel9.setForeground(Color.magenta);
jLabel9.setText("");
jLabel9.setBounds(new Rectangle(110,160, 250, 30));
jLabel10.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 20));
jLabel10.setForeground(Color.magenta);
jLabel10.setText("");
jLabel10.setBounds(new Rectangle(110, 200,250, 30));
jLabel11.setFont(new java.awt.Font("黑体", Font.PLAIN, 25));
jLabel11.setForeground(Color.red);
jLabel11.setText("");
jLabel11.setBounds(new Rectangle(110, 240, 130, 30));
jLabel12.setFont(new java.awt.Font("黑体", Font.PLAIN, 25));
jLabel12.setForeground(Color.red);
jLabel12.setText("");
jLabel12.setBounds(new Rectangle(110, 280, 130, 30));
jLabel6.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 15));
jLabel6.setForeground(Color.magenta);
jLabel6.setText("余额");
jLabel6.setBounds(new Rectangle(30, 280, 130, 30));
jButton1.setBounds(new Rectangle(84, 355, 57, 20));
jButton1.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 12));
jButton1.setForeground(Color.magenta);
jButton1.setText("上机");
jButton1.addActionListener(new xiajijiemian_jButton1_actionAdapter(this));
jButton2.setBounds(new Rectangle(182, 355, 57, 20));
jButton2.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 12));
jButton2.setForeground(Color.magenta);
jButton2.setText("下机");
jButton2.addActionListener(new xiajijiemian_jButton2_actionAdapter(this));
jLabel13.setText("");
jLabel13.setBounds(new Rectangle( 0, 0, 650, 488));
jLabel13 .setIcon(new ImageIcon("5.jpg"));
this.add(jLabel1);
this.add(jLabel3);
this.add(jLabel4);
this.add(jLabel5);
this.add(jLabel7);
this.add(jLabel8);
this.add(jLabel9);
this.add(jLabel10);
this.add(jLabel11);
this.add(jLabel12);
this.add(jLabel6);
this.add(jLabel2);
this.add(jButton1);
this.add(jButton2);
this.add(jLabel13);
}
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel4 = new JLabel();
JLabel jLabel5 = new JLabel();
JLabel jLabel7 = new JLabel();
JLabel jLabel8 = new JLabel();
JLabel jLabel9 = new JLabel();
JLabel jLabel10 = new JLabel();
JLabel jLabel11 = new JLabel();
JLabel jLabel12 = new JLabel();
JLabel jLabel6 = new JLabel();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
JLabel jLabel13 = new JLabel();
public void jButton1_actionPerformed(ActionEvent e) {
Shangjiface jiemian=new Shangjiface(main) ;
main.setContentPane(jiemian);
main.show();
}
public void jButton2_actionPerformed(ActionEvent e) {
xiajiface xia=new xiajiface(main);
xia.setSize(483,344);
Dimension dsize=xia.getPreferredSize();
Dimension fsize=xia.getSize();
Point loc=getLocation();
xia.setLocation(2*(fsize.width-dsize.width)/3+loc.x,4*(fsize.height-dsize.height)/5+loc.y );
xia.show();
}
}
class xiajijiemian_jButton2_actionAdapter implements ActionListener {
private xiajijiemian adaptee;
xiajijiemian_jButton2_actionAdapter(xiajijiemian adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
class xiajijiemian_jButton1_actionAdapter implements ActionListener {
private xiajijiemian adaptee;
xiajijiemian_jButton1_actionAdapter(xiajijiemian adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -