当我运行该应用程序时,我正在构建一个新的应用程序。
private void userPermession(){
try {
DefaultListModel model = new DefaultListModel();
String sql="select * from userMenu order by menuno";
pst = conn.prepareStatement(sql);
rs = pst.executeQuery();
while(rs.next()){
String m = rs.getString("menuName");
model.addElement(m);
}
lstMenu.setModel(model);
} catch (SQLException ex) {
JOptionPane.showMessageDialog(null, ex, "Error", HEIGHT);
}
}