使用此代码:
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import java.util.Vector;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
public class DisplayEmpData extends JFrame implements ActionListener {
JFrame frame1;
JLabel l0, l1, l2;
JComboBox c1;
JButton b1;
Connection con;
ResultSet rs, rs1;
Statement st, st1;
PreparedStatement pst;
String ids;
static JTable table;
String[] columnNames = {"User name", "Email", "Password", "Country"};
String from;
DisplayEmpData() {
l0 = new JLabel("Fatching Employee Information");
l0.setForeground(Color.red);
l0.setFont(new Font("Serif", Font.BOLD, 20));
l1 = new JLabel("Select name"