User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 402,011 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,399 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 433 | Replies: 5
Reply
Join Date: Jan 2008
Posts: 26
Reputation: abdulraqeeb33 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
abdulraqeeb33 abdulraqeeb33 is offline Offline
Light Poster

database contents display in a gui

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,695
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 195
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: database contents display in a gui

  #2  
Apr 24th, 2008
Create a JTable, create a custom TableModel for it, and have a Timer or whatever refresh that at regular intervals.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Join Date: Jan 2008
Posts: 26
Reputation: abdulraqeeb33 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
abdulraqeeb33 abdulraqeeb33 is offline Offline
Light Poster

Re: database contents display in a gui

  #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  
Join Date: Apr 2008
Location: Belgium
Posts: 47
Reputation: Jens is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
Jens's Avatar
Jens Jens is offline Offline
Light Poster

Re: database contents display in a gui

  #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  
Join Date: Jan 2008
Posts: 26
Reputation: abdulraqeeb33 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
abdulraqeeb33 abdulraqeeb33 is offline Offline
Light Poster

Re: database contents display in a gui

  #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  
Join Date: May 2007
Location: USA
Posts: 2,660
Reputation: Ezzaral is a glorious beacon of light Ezzaral is a glorious beacon of light Ezzaral is a glorious beacon of light Ezzaral is a glorious beacon of light Ezzaral is a glorious beacon of light 
Rep Power: 11
Solved Threads: 262
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Posting Maven

Re: database contents display in a gui

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Java Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 9:52 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC