I would like code to display ms access database dynamically in a jframe .
here is my database.[img]http://i.imgur.com/PtuGLnX.png?1[/img].I tried searching a lot but i think i need personal help in this area as this is a suppose to be dynamically updated Jframe.on the other hand i am open to suggestion to how to better display the database(considering the details IDE:eclipse luna for java ee,ms access 2010,my website is in .jsp file).thanks in advance.
You can do this by using JDBC to read the data and a JTable to display it. It's a fairly common thing to do, so you'll find many examples and tutorials on the web - just Google JDBC and JTable together
Agree with James, read the data and add to a JTable dynamically, in terms of it updating dynaimcally while in use I guess you may need to set a timer or something, maybe a thread, and update at regular intervals so that even while the table is on screen it will update if the database changes.
The OP said "display", which may imply that its not an updatable view - in which case its a lot lot simpler to do!
To handle updates, rather than a timer, you can listen for update events in the JTable and save the changes as they happen. Alternatively, you may prefer the kind of user interface where the user edits the table, then presses OK to commit the update, in which case you just listen for the OK button.
@stultuske would love to use .jsp as my UI but i dont know where to begin and my project guide suggested that i shoukd use Jframe,so i'm just following the instructions.And thanks JamesCherrill i found what i was looking for,even made it work.just need to lookup how i can implement the update/dynamic method so it becomes somoewhat realtime .
Edited 1 Year Ago by amogh.max: improved formatting
OK. I was talking about the user updating the database, so it's propbably not relevant here.
If the database is updated every second then maybe you have to use a timer to update the display every second, unless you can hook into the update code somehow to pass the new info directly to the display code
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...