perdon... no lo puse completo
public static void cargar_jlist()
{
try{
DefaultListModel defaultListModel = new DefaultListModel();
Statement temp_stmt = con.createStatement();
ResultSet temp_rs = temp_stmt.executeQuery("SELECT * FROM db.table1")
temp_rs.first();
do{
defaultListModel.addElement(temp_rs.getObject("columna").toString());
}while(temp_rs.next());
frame1.jList1.setModel(defaultListModel);
}//fin del try
catch(SQLException e){
System.out.println(" SQL Exception: "+ e.toString());
}
}
ahora si
public static void cargar_jlist()
{
try{
DefaultListModel defaultListModel = new DefaultListModel();
Statement temp_stmt = con.createStatement();
ResultSet temp_rs = temp_stmt.executeQuery("SELECT * FROM db.table1")
temp_rs.first();
do{
defaultListModel.addElement(temp_rs.getObject("columna").toString());
}while(temp_rs.next());
frame1.jList1.setModel(defaultListModel);
}//fin del try
catch(SQLException e){
System.out.println(" SQL Exception: "+ e.toString());
}
}
ahora si