📄 pointspanel.java~1~
字号:
package memberpane;
import javax.swing.*;
import java.awt.Rectangle;
import javax.swing.BorderFactory;
public class PointsPanel extends JPanel {
public PointsPanel(JTable table) {
this.table = table;
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
}
}
private void jbInit() throws Exception {
this.setLayout(null);
abovePanel.setBorder(BorderFactory.createEtchedBorder());
abovePanel.setBounds(new Rectangle(9, 8, 380, 129));
abovePanel.setLayout(null);
downPanel.setBorder(BorderFactory.createEtchedBorder());
downPanel.setBounds(new Rectangle(9, 147, 380, 76));
downPanel.setLayout(null);
jLabel1.setText("会员编号");
jLabel1.setBounds(new Rectangle(20, 21, 62, 24));
jLabel2.setText("会员姓名");
jLabel2.setBounds(new Rectangle(209, 21, 62, 24));
jLabel3.setText("会员类别");
jLabel3.setBounds(new Rectangle(20, 54, 62, 24));
jLabel4.setText("登记日期");
jLabel4.setBounds(new Rectangle(209, 54, 62, 24));
jLabel5.setText("储值余额");
jLabel5.setBounds(new Rectangle(20, 86, 62, 24));
jLabel6.setText("当前积分");
jLabel6.setBounds(new Rectangle(209, 86, 62, 24));
pointsField.setBounds(new Rectangle(245, 25, 80, 24));
vipidField.setEditable(false);
vipidField.setBounds(new Rectangle(81, 21, 80, 24));
nameField.setEditable(false);
nameField.setBounds(new Rectangle(270, 21, 80, 24));
vipKindField.setEditable(false);
vipKindField.setBounds(new Rectangle(81, 54, 80, 24));
enterDateField.setEditable(false);
enterDateField.setBounds(new Rectangle(270, 54, 80, 24));
curMoneyField.setEditable(false);
curMoneyField.setBounds(new Rectangle(81, 86, 80, 24));
curPointsField.setEditable(false);
curPointsField.setBounds(new Rectangle(270, 86, 80, 24));
jLabel7.setText("操作分值");
jLabel7.setBounds(new Rectangle(184, 25, 62, 24));
increaseRadioButton.setText("增加积分操作");
increaseRadioButton.setBounds(new Rectangle(55, 12, 108, 24));
reduceRadioButton.setText("减少积分操作");
reduceRadioButton.setBounds(new Rectangle(55, 40, 108, 24));
okButton.setBounds(new Rectangle(81, 238, 87, 31));
okButton.setText("确定");
cancelButton.setBounds(new Rectangle(205, 237, 87, 31));
cancelButton.setText("取消");
this.add(abovePanel);
abovePanel.add(vipKindField);
abovePanel.add(curMoneyField);
abovePanel.add(curPointsField);
abovePanel.add(jLabel6);
abovePanel.add(jLabel4);
abovePanel.add(jLabel5);
abovePanel.add(jLabel1);
abovePanel.add(jLabel3);
abovePanel.add(jLabel2);
abovePanel.add(vipidField);
abovePanel.add(enterDateField);
abovePanel.add(nameField);
this.add(downPanel);
downPanel.add(reduceRadioButton);
downPanel.add(increaseRadioButton);
downPanel.add(jLabel7);
downPanel.add(pointsField);
this.add(okButton);
this.add(cancelButton);
buttonGroup.add(increaseRadioButton);
buttonGroup.add(reduceRadioButton);
}
JPanel abovePanel = new JPanel();
JPanel downPanel = new JPanel();
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
JLabel jLabel4 = new JLabel();
JLabel jLabel5 = new JLabel();
JLabel jLabel6 = new JLabel();
JTextField pointsField = new JTextField();
JTextField vipidField = new JTextField();
JTextField nameField = new JTextField();
JTextField vipKindField = new JTextField();
JTextField enterDateField = new JTextField();
JTextField curMoneyField = new JTextField();
JTextField curPointsField = new JTextField();
JLabel jLabel7 = new JLabel();
JRadioButton increaseRadioButton = new JRadioButton();
JRadioButton reduceRadioButton = new JRadioButton();
JButton okButton = new JButton();
JButton cancelButton = new JButton();
ButtonGroup buttonGroup = new ButtonGroup();
JTable table = null;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -