📄 pnllendnumber_modify.java
字号:
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.*;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
public class pnlLendNumber_Modify extends JPanel {
FrmBook fm;
public pnlLendNumber_Modify(FrmBook f) {
fm=f;
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setLayout(null);
jLabel1.setFont(new java.awt.Font("Dialog", Font.BOLD, 11));
jLabel1.setText("请输入要修改的借书证号:");
jLabel1.setBounds(new Rectangle(18, 12, 152, 36));
txtLendNumber.setBounds(new Rectangle(192, 16, 136, 30));
btnModify.setBounds(new Rectangle(79, 60, 77, 43));
btnModify.setText("我要修改");
btnModify.addActionListener(new
pnlLendNumber_Modify_btnModify_actionAdapter(this));
btnReset.setBounds(new Rectangle(190, 60, 77, 43));
btnReset.setText("重置");
btnReset.addActionListener(new
pnlLendNumber_Modify_btnReset_actionAdapter(this));
this.add(jLabel1);
this.add(txtLendNumber);
this.add(btnModify);
this.add(btnReset);
}
JLabel jLabel1 = new JLabel();
static JTextField txtLendNumber = new JTextField();
JButton btnModify = new JButton();
JButton btnReset = new JButton();
public void btnReset_actionPerformed(ActionEvent e) {
txtLendNumber.setText("");
}
public void btnModify_actionPerformed(ActionEvent e) {
ArrayList a=new ArrayList();
a=clsLendNumber_condb.ModifyData(txtLendNumber.getText());
if(a.size()>0)
{
pnlLendNumber_Modify2 lnm2 = new pnlLendNumber_Modify2(fm);
fm.spnV.setTopComponent(lnm2);
}
}
}
class pnlLendNumber_Modify_btnModify_actionAdapter implements ActionListener {
private pnlLendNumber_Modify adaptee;
pnlLendNumber_Modify_btnModify_actionAdapter(pnlLendNumber_Modify adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.btnModify_actionPerformed(e);
}
}
class pnlLendNumber_Modify_btnReset_actionAdapter implements ActionListener {
private pnlLendNumber_Modify adaptee;
pnlLendNumber_Modify_btnReset_actionAdapter(pnlLendNumber_Modify adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.btnReset_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -