📄 kcxx_mod.java~7~
字号:
package basecode.kcsz;import javax.swing.*;import java.awt.*;import com.zdsoft.datacenter.*;import com.zdsoft.datastore.*;import com.zdsoft.gui.*;import java.awt.event.*;//import java.util.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class KCXX_mod extends ASFrame {private KCXX_list CMF;private int idCMF; JPanel jPanel1 = new JPanel(); JPanel jPanel2 = new JPanel(); JPanel jPanel3 = new JPanel(); JPanel jPanel4 = new JPanel(); JPanel jPanel5 = new JPanel(); GridBagLayout gridBagLayout1 = new GridBagLayout(); JLabel jLabel1 = new JLabel(); JLabel jLabel2 = new JLabel(); JTextField jTextField1 = new JTextField(5); JTextField jTextField2 = new JTextField(5); JPanel jPanel6 = new JPanel(); JButton jButton1 = new JButton(); JButton jButton2 = new JButton(); public KCXX_mod(KCXX_list cmf) { try { this.CMF=cmf; jbInit(); } catch(Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { jPanel1.setLayout(gridBagLayout1); jLabel1.setFont(new java.awt.Font("Serif", 0, 15)); jLabel1.setText("课程名称 "); jLabel2.setFont(new java.awt.Font("Serif", 0, 15)); jLabel2.setText("课程代号"); jButton1.setFont(new java.awt.Font("Serif", 0, 12)); jButton1.setText("取消"); jButton2.setFont(new java.awt.Font("Serif", 0, 12)); jButton2.setText("保存"); this.setTitle("修改信息") ; jButton2.addActionListener(new KCXX_add_jButton2_actionAdapter(this)); this.setSize(new Dimension(407, 219)); jTextField1.setText(""); jTextField2.setEditable(true); jTextField2.setText(""); jPanel1.setBorder(BorderFactory.createEtchedBorder()); jPanel6.setBorder(BorderFactory.createEtchedBorder()); this.getContentPane().add(jPanel1, BorderLayout.CENTER); jPanel1.add(jLabel2, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 16, 0), 0, 0)); jPanel1.add(jTextField1, new GridBagConstraints(1, 0, 3, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 20, 0), 119, 0)); jPanel1.add(jTextField2, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 119, 0)); jPanel1.add(jLabel1, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jPanel1.add(jPanel6, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(50, -14, 2, 14), 0, 2)); jPanel6.add(jButton2, null); jPanel6.add(jButton1, null); this.getContentPane().add(jPanel2, BorderLayout.SOUTH); this.getContentPane().add(jPanel3, BorderLayout.WEST); this.getContentPane().add(jPanel4, BorderLayout.EAST); this.getContentPane().add(jPanel5, BorderLayout.NORTH); try{ int row = CMF.jTable.getSelectedRow(); idCMF = CMF.ds.getItemInteger(row,"kc_id").intValue(); jTextField1.setText(CMF.ds.getItemString(row,"kc_code")) ; jTextField2.setText(CMF.ds.getItemString(row,"kc_name")) ; } catch(Exception e){System.out.println("修改显示视图");} this.setWindowCenter(); } void jButton2_actionPerformed(ActionEvent e) {}class KCXX_add_jButton2_actionAdapter implements java.awt.event.ActionListener { KCXX_mod adaptee; KCXX_add_jButton2_actionAdapter(KCXX_mod adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jButton2_actionPerformed(e); }}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -