943,708 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 2196
  • Java RSS
Apr 24th, 2008
0

database contents display in a gui

Expand Post »
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
Similar Threads
Reputation Points: 17
Solved Threads: 0
Light Poster
abdulraqeeb33 is offline Offline
40 posts
since Jan 2008
Apr 24th, 2008
0

Re: database contents display in a gui

Create a JTable, create a custom TableModel for it, and have a Timer or whatever refresh that at regular intervals.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Apr 24th, 2008
0

Re: database contents display in a gui

Tablemodel??? wat is that? do u have or know of any simple example that explains it?



Click to Expand / Collapse  Quote originally posted by jwenting ...
Create a JTable, create a custom TableModel for it, and have a Timer or whatever refresh that at regular intervals.
Reputation Points: 17
Solved Threads: 0
Light Poster
abdulraqeeb33 is offline Offline
40 posts
since Jan 2008
Apr 24th, 2008
0

Re: database contents display in a gui

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.
Reputation Points: 13
Solved Threads: 6
Light Poster
Jens is offline Offline
47 posts
since Apr 2008
Apr 24th, 2008
0

Re: database contents display in a gui

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?


Click to Expand / Collapse  Quote originally posted by Jens ...
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.
Reputation Points: 17
Solved Threads: 0
Light Poster
abdulraqeeb33 is offline Offline
40 posts
since Jan 2008
Apr 24th, 2008
0

Re: database contents display in a gui

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.)
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Ezzaral is offline Offline
6,758 posts
since May 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: shall I do it in struts or AJAX(URGENT)
Next Thread in Java Forum Timeline: i need 6th version java tutorial





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC