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

📄 deluser.java

📁 包括源代码
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package testgui;import DBOperation.*;import java.awt.*;import javax.swing.*;import java.awt.event.*;import java.io.*;/** * * @author DancingMoon */public class DelUser extends JDialog implements ActionListener{    JLabel 用户名,提示;    JTextField 用户名1;    JButton 确定,取消;        public DelUser(UserTest del)    {        super();        //super(del,"删除用户",false);              用户名=new JLabel("用户名");        提示=new JLabel("请在下面文本框内输入您要删除的用户名");        用户名1= new JTextField("");        确定=new JButton("确定");        取消=new JButton("取消");                确定.addActionListener(this);        取消.addActionListener(this);                this.add(用户名1);        this.add(用户名);        this.add(确定);        this.add(取消);        this.add(提示);                this.setLayout(null);        提示.setBounds(10, 10, 240, 20);        用户名.setBounds(10, 40, 50, 20);        用户名1.setBounds(60, 40, 150, 20);        确定.setBounds(50, 70, 80, 20);        取消.setBounds(140, 70, 80, 20);        this.setBounds(600, 300, 260, 130);        this.setVisible(false);    }    public void actionPerformed(ActionEvent e) {        if(e.getSource()==确定)        {            DBUser user = new DBUser();            user.UserDel(用户名1.getText());            this.setVisible(false);        }                if(e.getSource()==取消)        {            this.setVisible(false);        }                   throw new UnsupportedOperationException("Not supported yet.");    }}

⌨️ 快捷键说明

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