📄 checkinfor.java~34~
字号:
package chuxu;
import javax.swing.*;
import javax.swing.DebugGraphics;
import java.awt.Rectangle;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.Dimension;
import javax.swing.border.TitledBorder;
import java.awt.BorderLayout;
import java.awt.Font;
import javax.swing.border.TitledBorder;
import java.awt.Point;
import java.awt.SystemColor;
import java.sql.ResultSet;
import Database.DbConnector;
import Database.SqlController;
import java.sql.*;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class CheckInfor extends JFrame{
JPanel contentPane;
JPanel chuxumenu;
JMenuBar jMenuBar1 = new JMenuBar();
JMenu jMenuFile = new JMenu();
JMenuItem jMenuFileExit = new JMenuItem();
JMenu jMenuHelp = new JMenu();
JMenuItem jMenuHelpAbout = new JMenuItem();
JToolBar jToolBar = new JToolBar();
JMenuItem jMenuItem1 = new JMenuItem();
TitledBorder titledBorder1 = new TitledBorder("");
ResultSet sql;
String Cnum;
public CheckInfor(String cnum) {
this.Cnum =cnum;
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
}
}
private void jbInit() throws Exception {
setSize(new Dimension(500, 400));
setTitle("SE 银行--储蓄--查询");
jButton1.setBounds(new Rectangle(65, 64, 116, 55));
jButton1.setText("查询存储记录");
jButton1.addActionListener(new CheckInfor_jButton1_actionAdapter(this));
this.getContentPane().setLayout(null);
jButton2.addActionListener(new CheckInfor_jButton2_actionAdapter(this));
jButton3.setBounds(new Rectangle(315, 250, 99, 35));
jButton3.setText("取消");
jButton3.addActionListener(new CheckInfor_jButton3_actionAdapter(this));
this.getContentPane().add(jButton1, null);
this.getContentPane().add(jButton2);
contentPane = (JPanel) getContentPane();
jMenuFileExit.setText("离开");
jMenuFileExit.addActionListener(new CheckInfor_jMenuFileExit_ActionAdapter(this));
jMenuHelp.setText("Help");
jMenuHelpAbout.setText("About");
jMenuHelpAbout.addActionListener(new CheckInfor_jMenuHelpAbout_ActionAdapter(this));
jToolBar.setBounds(new Rectangle(0, 0, 13, 2));
jMenuFile.setText("选项");
jMenuItem1.setText("注销");
jMenuBar1.add(jMenuFile);
jMenuBar1.add(jMenuHelp);
jMenuHelp.add(jMenuHelpAbout);
setJMenuBar(jMenuBar1);
contentPane.add(jToolBar, null);
contentPane.add(jButton3);
jMenuFile.add(jMenuItem1);
jMenuFile.add(jMenuFileExit);
jButton2.setBounds(new Rectangle(261, 60, 129, 55));
jButton2.setText("查询余额");
}
String[][] rData;
String[] cName;
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
// JFrame checkRecord = new CheckRecord(rData, cName);
JFrame checkMoney = new CheckMoney();
JButton jButton3 = new JButton();
void jMenuFileExit_actionPerformed(ActionEvent actionEvent) {
System.exit(0);
}
void jMenuHelpAbout_actionPerformed(ActionEvent actionEvent) {
Dimension frmSize = getSize();
Point loc = getLocation();
}
public void jButton1_actionPerformed(ActionEvent e) {
CheckR checkrecord = new CheckR(Cnum);
DbConnector conn = DbConnector.getInstance();
SqlController sql = new SqlController(conn.getConnection());
ResultSet rs=sql.SelectStmt("select * from 存取记录表");
try {
rs.next();
/* String a = rs.getString("帐户号");
String b = rs.getString("类型");
String c = rs.getString("金额");
String d = rs.getString("日期");
String[][] rowData={{"帐户号","类型","金额","日期"},{a,b,c,d}};
String[] colName={"帐户号","类型","金额","日期"};
CheckRecord checkrecord = new CheckRecord(rowData,colName);*/
checkrecord.setVisible(true);
// dispose();
} catch (SQLException ex) {
}
}
public void jButton2_actionPerformed(ActionEvent e) {
try { checkMoney.setVisible(true);
dispose();
} catch (Exception exception) {
exception.printStackTrace();
}
}
public void jButton3_actionPerformed(ActionEvent e) {
dispose();
}
}
class CheckInfor_jButton3_actionAdapter implements ActionListener {
private CheckInfor adaptee;
CheckInfor_jButton3_actionAdapter(CheckInfor adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton3_actionPerformed(e);
}
}
class CheckInfor_jButton2_actionAdapter implements ActionListener {
private CheckInfor adaptee;
CheckInfor_jButton2_actionAdapter(CheckInfor adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
class CheckInfor_jButton1_actionAdapter implements ActionListener {
private CheckInfor adaptee;
CheckInfor_jButton1_actionAdapter(CheckInfor adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
class CheckInfor_jMenuFileExit_ActionAdapter implements ActionListener {
CheckInfor adaptee;
CheckInfor_jMenuFileExit_ActionAdapter(CheckInfor adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent actionEvent) {
adaptee.jMenuFileExit_actionPerformed(actionEvent);
}
}
class CheckInfor_jMenuHelpAbout_ActionAdapter implements ActionListener {
CheckInfor adaptee;
CheckInfor_jMenuHelpAbout_ActionAdapter(CheckInfor adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent actionEvent) {
adaptee.jMenuHelpAbout_actionPerformed(actionEvent);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -