Results 1 to 1 of 1
- 05-14-2012, 04:57 PM #1
Member
- Join Date
- May 2011
- Posts
- 10
- Rep Power
- 0
Filling a JTable from a Access 2003 DB Table on Button Action Event
Hi there I have created a link to a ms acess 2003 db and sucessfully ran and tested it out. What I am now after is a means to populate a table with information from an SQL query. After a button press event. The app uses a software development DB.The sequence of events is as follows;
1) User clicks button which opens up a JFrame with a table which hold the results of query from the request page. T
2) The results of the previous query are then populated into the table on the next page via a while loop.
Rough idea on my code -
while(rs.next())
{ String d1 = rs.getString("developerID");
String d2 = rs.getString("developerName");
String d3 = rs.getString("Avaiable");
model.addRow(new Object[]{d1, d2, d3});
This is rough idea, my main problem is that I do not know how to reference a table from outside its Jframe. Sorry I am still very new to this language. The name of the Jtable on the 2nd page is "AvailableDevelopersTbl" and the class which it belongs to is "AvailableDevelopersReport". Any help would be much appreciated.
Similar Threads
-
Table cells change to editable by button click action
By Zamioculcas in forum New To JavaReplies: 2Last Post: 11-24-2011, 09:50 PM -
Filling Text Field from information from JTable
By Dcalladi in forum AWT / SwingReplies: 3Last Post: 10-20-2011, 05:12 PM -
How can I to add a mouse event to a button that it'll edit itself and other button
By mad72584 in forum New To JavaReplies: 7Last Post: 08-06-2011, 03:39 AM -
Filling a JTable
By aborgeld in forum Advanced JavaReplies: 0Last Post: 01-08-2011, 01:37 PM -
Action Event and Listeners
By lost1 in forum New To JavaReplies: 3Last Post: 11-14-2007, 04:26 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks