database contents display in a gui

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2008
Posts: 26
Reputation: abdulraqeeb33 is an unknown quantity at this point 
Solved Threads: 0
abdulraqeeb33 abdulraqeeb33 is offline Offline
Light Poster

database contents display in a gui

 
0
  #1
Apr 24th, 2008
i need to display the contents of a database(table) MS access db, on to the screen. how do i got abt it??? the data keeps changing dynamically...the program should be able to refresh it self
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: database contents display in a gui

 
0
  #2
Apr 24th, 2008
Create a JTable, create a custom TableModel for it, and have a Timer or whatever refresh that at regular intervals.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 26
Reputation: abdulraqeeb33 is an unknown quantity at this point 
Solved Threads: 0
abdulraqeeb33 abdulraqeeb33 is offline Offline
Light Poster

Re: database contents display in a gui

 
0
  #3
Apr 24th, 2008
Tablemodel??? wat is that? do u have or know of any simple example that explains it?



Originally Posted by jwenting View Post
Create a JTable, create a custom TableModel for it, and have a Timer or whatever refresh that at regular intervals.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 47
Reputation: Jens is an unknown quantity at this point 
Solved Threads: 5
Jens's Avatar
Jens Jens is offline Offline
Light Poster

Re: database contents display in a gui

 
0
  #4
Apr 24th, 2008
Try to cut up your structure of your program in several little pieces and start with those one by one.

For example: You'll first need to make a connection to a database itself.
If your connection works, you can try to read out your data. (A datareader is recommended).
After this you can start building up your gui (there is quite a lot of documentation on this too, try the java swing components) and how you are going to refresh the data.

Baby steps, baby steps :p.

The making of a connection, reading it and the creation of the gui are well documented on the internet. I suggest that you try to make those step by step. If you have difficulties at any given moment with any given 'module', you can always ask for a specific problem.

I hope this helps a bit, good luck with your program.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 26
Reputation: abdulraqeeb33 is an unknown quantity at this point 
Solved Threads: 0
abdulraqeeb33 abdulraqeeb33 is offline Offline
Light Poster

Re: database contents display in a gui

 
0
  #5
Apr 24th, 2008
thanks for the steps... but i know upto retrieving values from the db...how do i display it in a table? and with the varying number of records in how does the table rows increase or decrease?


Originally Posted by Jens View Post
Try to cut up your structure of your program in several little pieces and start with those one by one.

For example: You'll first need to make a connection to a database itself.
If your connection works, you can try to read out your data. (A datareader is recommended).
After this you can start building up your gui (there is quite a lot of documentation on this too, try the java swing components) and how you are going to refresh the data.

Baby steps, baby steps :p.

The making of a connection, reading it and the creation of the gui are well documented on the internet. I suggest that you try to make those step by step. If you have difficulties at any given moment with any given 'module', you can always ask for a specific problem.

I hope this helps a bit, good luck with your program.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4,483
Reputation: Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of 
Solved Threads: 515
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: database contents display in a gui

 
0
  #6
Apr 24th, 2008
Start with a simple tutorial on JTable: http://java.sun.com/docs/books/tutor...nts/table.html

(These examples that you keep asking for are incredibly easy to locate with a very simple search. You should take a little initiative to find them before asking others to give them to you.)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC