JDBC « JList « Java Swing Q&A





1. JList Problem    coderanch.com

2. How can you show data from a specific colum in a JList? through JDBC    coderanch.com

public List getAllPeople() { List results= null; ResultSet resultSet = null; try { resultSet = selectAllPeople.executeQuery(); results = new ArrayList(); while (resultSet.next()) { results.add( new Staff ( resultSet.getInt("staffNum"), resultSet.getString("firstName"), resultSet.getString("lastName"), resultSet.getString("email"), resultSet.getString("phoneNumber"), resultSet.getString("Address"), resultSet.getString("PostCode"), resultSet.getString("staffID"), resultSet.getString("password"), resultSet.getString("StaffPosition"), resultSet.getDouble("Salary") )); } } catch (SQLException sqlException) { sqlException.printStackTrace(); } finally { try { resultSet.close(); } catch (SQLException sqlException) { sqlException.printStackTrace(); } } return ...

3. JDBC & Adv. Swing...JLists...help with a few exercises for my class!    dbforums.com

I have a few exercises that I need to do for my class and I was wondering if maybe someone could show me the codes for them. 1. Create employee JLists with changeable choices to ADD or DELETE a list item. 2. Create an employee JTable with four columns of employee info. EmployeeID Name Title Salary 3. Design an ACCESS or ...

4. how to take query results to a jlist!!    java-forums.org

here's ma code its from netbeans. Java Code: /*first i'm using two Jbuttons, *the first buttons reads the selected database to connect to from a JComboBox; 1 being MySql * it thus retrives the username, passwd and database to connect and executes the connection * *the second is to run the entered queries but for development purposes I have had to ...