DeleteUser.java~3~
上传用户:liming9091
上传日期:2014-10-27
资源大小:3376k
文件大小:2k
源码类别:

Java编程

开发平台:

Java

  1. package uml_gaokai;
  2. import java.awt.*;
  3. import javax.swing.*;
  4. import com.borland.jbcl.layout.*;
  5. import java.awt.event.*;
  6. /**
  7.  * <p>Title: </p>
  8.  * <p>Description: </p>
  9.  * <p>Copyright: Copyright (c) 2003</p>
  10.  * <p>Company: </p>
  11.  * @author unascribed
  12.  * @version 1.0
  13.  */
  14. public class DeleteUser extends JDialog {
  15.   private JPanel panel1 = new JPanel();
  16.   private XYLayout xYLayout1 = new XYLayout();
  17.   private JLabel jLabel1 = new JLabel();
  18.   private JLabel jLabel2 = new JLabel();
  19.   private JTextField jTextField1 = new JTextField();
  20.   private JTextField jTextField2 = new JTextField();
  21.   private JButton jButton1 = new JButton();
  22.   private JButton jButton2 = new JButton();
  23.   public DeleteUser(Frame frame, String title, boolean modal) {
  24.     super(frame, title, modal);
  25.     try {
  26.       jbInit();
  27.       pack();
  28.     }
  29.     catch(Exception ex) {
  30.       ex.printStackTrace();
  31.     }
  32.   }
  33.   public DeleteUser() {
  34.     this(null, "", false);
  35.   }
  36.   private void jbInit() throws Exception {
  37.     panel1.setLayout(xYLayout1);
  38.     jLabel1.setText("用户名");
  39.     jLabel2.setText("类别");
  40.     jButton1.setText("确定");
  41.     jButton1.addActionListener(new java.awt.event.ActionListener() {
  42.       public void actionPerformed(ActionEvent e) {
  43.         jButton1_actionPerformed(e);
  44.       }
  45.     });
  46.     jButton2.setText("取消");
  47.     jButton2.addActionListener(new java.awt.event.ActionListener() {
  48.       public void actionPerformed(ActionEvent e) {
  49.         jButton2_actionPerformed(e);
  50.       }
  51.     });
  52.     getContentPane().add(panel1);
  53.     panel1.add(jLabel1,  new XYConstraints(58, 44, 78, 25));
  54.     panel1.add(jLabel2,  new XYConstraints(59, 92, 84, 27));
  55.     panel1.add(jTextField1,  new XYConstraints(153, 44, 109, 27));
  56.     panel1.add(jTextField2,  new XYConstraints(153, 93, 112, 29));
  57.     panel1.add(jButton1,  new XYConstraints(151, 202, 82, 28));
  58.     panel1.add(jButton2,       new XYConstraints(256, 203, 83, 27));
  59.   }
  60.   public void cancel(){
  61.     dispose() ;
  62.   }
  63.   void jButton2_actionPerformed(ActionEvent e) {
  64.     cancel();
  65.   }
  66.   void jButton1_actionPerformed(ActionEvent e) {
  67.     String userName = String.valueOf(jTextField1.getText()) ;
  68.     String userAuthority = String.valueOf(jTextField2.getText()) ;
  69.     JOptionPane.showMessageDialog(null,"请问是否删除该用户","",JOptionPane.DEFAULT_OPTION) ;
  70.     if(){}
  71.   }
  72. }