⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modifydialog.java

📁 基于面向对象的数据库编程
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package view;import java.awt.*;import javax.swing.*;import com.borland.jbcl.layout.*;import java.awt.event.*;import operation.*;import helper.*;import brgeometry.*;import com.versant.fund.*;import com.versant.trans.*;public class ModifyDialog extends JDialog {  private XYLayout xYLayout1 = new XYLayout();  private JTabbedPane jTabbedPane1 = new JTabbedPane();  private JPanel jPanel1 = new JPanel();  private JPanel jPanel2 = new JPanel();  private JLabel jLabel1 = new JLabel();  private XYLayout xYLayout2 = new XYLayout();  private XYLayout xYLayout3 = new XYLayout();  private JComboBox jComboBox1 = new JComboBox();  private JTextField jTextField1 = new JTextField();  private JTextField jTextField2 = new JTextField();  private JTextField jTextField3 = new JTextField();  private JTextField jTextField4 = new JTextField();  private JButton jButton1 = new JButton();  private JButton jButton2 = new JButton();  private JButton jButton3 = new JButton();  private JLabel jLabel2 = new JLabel();  private JLabel jLabel3 = new JLabel();  private JLabel jLabel4 = new JLabel();  private JLabel jLabel5 = new JLabel();  private JLabel jLabel6 = new JLabel();  private JComboBox jComboBox2 = new JComboBox();  private JTextField jTextField5 = new JTextField();  private ButtonGroup buttonGroup1 = new ButtonGroup();  private JRadioButton jRadioButton1 = new JRadioButton();  private JRadioButton jRadioButton2 = new JRadioButton();  private JRadioButton jRadioButton3 = new JRadioButton();  private JTextField jTextField6 = new JTextField();  private JTextField jTextField7 = new JTextField();  private JLabel jLabel7 = new JLabel();  private JLabel jLabel8 = new JLabel();  private JLabel jLabel9 = new JLabel();  private JLabel jLabel10 = new JLabel();  private JLabel jLabel11 = new JLabel();  private JButton jButton4 = new JButton();  private JButton jButton5 = new JButton();  private JButton jButton6 = new JButton();  private JTextField jTextField11 = new JTextField();  private JTextField jTextField12 = new JTextField();  private JLabel jLabel12 = new JLabel();  private JLabel jLabel13 = new JLabel();  private JLabel jLabel14 = new JLabel();  private JTextField jTextField8 = new JTextField();  private JLabel jLabel15 = new JLabel();  public ModifyDialog(Frame frame, String title, boolean modal) {    super(frame, title, modal);    try {      jbInit();      pack();    }    catch(Exception ex) {      ex.printStackTrace();    }  }  public ModifyDialog() {    this(null, "", false);  }  private void jbInit() throws Exception {    this.getContentPane().setLayout(xYLayout1);    xYLayout1.setWidth(585);    xYLayout1.setHeight(478);    jPanel1.setBackground(SystemColor.info);    jPanel1.setToolTipText("的");    jPanel1.setLayout(xYLayout2);    jPanel2.setBackground(SystemColor.info);    jPanel2.setLayout(xYLayout3);    jLabel1.setFont(new java.awt.Font("Dialog", 0, 20));    jLabel1.setForeground(Color.red);    jLabel1.setText("修改");    jButton1.setBackground(SystemColor.inactiveCaptionText);    jButton1.setBorder(BorderFactory.createLineBorder(Color.black));    jButton1.setText("确定");    jButton1.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton1_actionPerformed(e);      }    });    jButton2.setBackground(SystemColor.inactiveCaptionText);    jButton2.setBorder(BorderFactory.createLineBorder(Color.black));    jButton2.setText("重置");    jButton2.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton2_actionPerformed(e);      }    });    jButton3.setBackground(SystemColor.inactiveCaptionText);    jButton3.setBorder(BorderFactory.createLineBorder(Color.black));    jButton3.setText("取消");    jButton3.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton3_actionPerformed(e);      }    });    jLabel2.setText("请选择您要修改的体的类型");    jLabel3.setText("长度");    jLabel4.setText("宽度");    jLabel5.setText("高度");    jLabel6.setText("半径");    jTabbedPane1.setBackground(SystemColor.info);    this.getContentPane().setBackground(SystemColor.info);    jRadioButton1.setBackground(SystemColor.info);    jRadioButton1.setBorder(BorderFactory.createLineBorder(Color.black));    jRadioButton1.setSelected(true);    jRadioButton1.setText("平移");    jRadioButton1.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jRadioButton1_actionPerformed(e);      }    });    jRadioButton2.setBackground(SystemColor.info);    jRadioButton2.setText("缩放");    jRadioButton2.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jRadioButton2_actionPerformed(e);      }    });    jRadioButton3.setBackground(SystemColor.info);    jRadioButton3.setEnabled(false);    jRadioButton3.setText("旋转");    jTextField6.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jTextField6_actionPerformed(e);      }    });    jLabel7.setText("请选择需要修改的体的类型");    jLabel8.setText("请输入需要修改的体的名字");    jLabel9.setText("平移距离");    jLabel10.setText("缩放倍数");    jLabel11.setEnabled(false);    jLabel11.setText("角度");    jButton4.setBackground(SystemColor.inactiveCaptionText);    jButton4.setBorder(BorderFactory.createLineBorder(Color.black));    jButton4.setText("确定");    jButton4.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton4_actionPerformed(e);      }    });    jButton5.setBackground(SystemColor.inactiveCaptionText);    jButton5.setBorder(BorderFactory.createLineBorder(Color.black));    jButton5.setText("重置");    jButton5.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton5_actionPerformed(e);      }    });    jButton6.setBackground(SystemColor.inactiveCaptionText);    jButton6.setBorder(BorderFactory.createLineBorder(Color.black));    jButton6.setText("取消");    jButton6.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jButton6_actionPerformed(e);      }    });    jLabel12.setText("x");    jLabel13.setText("y");    jLabel14.setText("z");    jComboBox1.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jComboBox1_actionPerformed(e);      }    });    jLabel15.setText("请输入需要修改的体的名字");    jComboBox2.addActionListener(new java.awt.event.ActionListener() {      public void actionPerformed(ActionEvent e) {        jComboBox2_actionPerformed(e);      }    });    this.getContentPane().add(jTabbedPane1,        new XYConstraints(35, 121, 523, 342));    jPanel1.add(jTextField1,  new XYConstraints(290, 66, 107, 23));    jPanel1.add(jTextField2,  new XYConstraints(290, 108, 108, 25));    jPanel1.add(jTextField3,     new XYConstraints(290, 147, 105, 24));    jPanel1.add(jTextField4,   new XYConstraints(290, 193, 103, -1));    jPanel1.add(jButton1,  new XYConstraints(63, 233, 85, 28));    jPanel1.add(jButton2,     new XYConstraints(187, 234, 88, 26));    jPanel1.add(jButton3,     new XYConstraints(335, 232, 84, 27));    jPanel1.add(jLabel6,   new XYConstraints(220, 190, 45, 24));    jPanel1.add(jLabel3, new XYConstraints(220, 66, 50, 22));    jPanel1.add(jLabel2, new XYConstraints(44, 66, 153, 25));    jPanel1.add(jComboBox1, new XYConstraints(51, 102, 122, 24));    jPanel1.add(jTextField8,    new XYConstraints(55, 177, 122, 28));    jPanel1.add(jLabel15, new XYConstraints(49, 140, 145, 28));    jPanel1.add(jLabel4, new XYConstraints(220, 106, 53, 24));    jPanel1.add(jLabel5, new XYConstraints(218, 146, 55, 29));    jTabbedPane1.add(jPanel2,  "隐式修改");    jPanel2.add(jComboBox2, new XYConstraints(43, 47, 130, 25));    jPanel2.add(jRadioButton1, new XYConstraints(46, 101, -1, -1));    jPanel2.add(jRadioButton2, new XYConstraints(45, 157, -1, -1));    jPanel2.add(jButton4,    new XYConstraints(40, 250, 84, 32));    jPanel2.add(jButton5, new XYConstraints(179, 251, 84, 33));    jPanel2.add(jButton6,    new XYConstraints(311, 250, 86, 33));    jPanel2.add(jRadioButton3, new XYConstraints(51, 207, -1, -1));    jPanel2.add(jLabel11, new XYConstraints(140, 208, -1, -1));    jPanel2.add(jLabel10, new XYConstraints(131, 161, -1, -1));    jPanel2.add(jLabel9, new XYConstraints(135, 104, -1, 19));    jPanel2.add(jTextField11,    new XYConstraints(306, 109, 39, 20));    jPanel2.add(jLabel13, new XYConstraints(288, 109, 19, -1));    jPanel2.add(jTextField6,  new XYConstraints(242, 109, 39, 21));    jPanel2.add(jLabel12, new XYConstraints(219, 109, 28, -1));    jPanel2.add(jTextField7,   new XYConstraints(242, 158, 171, -1));    jPanel2.add(jTextField5,  new XYConstraints(242, 44, 171, 25));    jPanel2.add(jTextField12,       new XYConstraints(373, 106, 42, -1));    jPanel2.add(jLabel14, new XYConstraints(356, 109, 21, -1));    jPanel2.add(jLabel7, new XYConstraints(35, 19, 162, 23));    jPanel2.add(jLabel8, new XYConstraints(252, 14, 165, 22));    jTabbedPane1.add(jPanel1, "显式修改");    this.getContentPane().add(jLabel1,    new XYConstraints(285, 51, 40, 41));    jComboBox1.addItem("长方体");    jComboBox1.addItem("立方体");    jComboBox1.addItem("圆柱体");    jComboBox1.addItem("圆锥体");    jComboBox1.addItem("球体" );    jComboBox2.addItem("长方体");    jComboBox2.addItem("立方体");    jComboBox2.addItem("圆柱体");    jComboBox2.addItem("圆锥体");    jComboBox2.addItem("球体" );    buttonGroup1.add(jRadioButton1);    buttonGroup1.add(jRadioButton2);    buttonGroup1.add(jRadioButton3);  }  void jButton2_actionPerformed(ActionEvent e) {    jTextField1.setText("");    jTextField2.setText("");    jTextField3.setText("");    jTextField4.setText("");    jTextField8.setText("");  }  void jButton3_actionPerformed(ActionEvent e) {    this.dispose();  }  void jButton1_actionPerformed(ActionEvent e) {    String s,s1="",s2;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -