• Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating a swing client for a MySQL database.

 
ashley stewart
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to create a GUI client for a MySql database. What's the best way to go about this with regards to having different panels for different views and entry forms? Surely I can't create a class for every table or view in the database, so I assume I need to get the number of columns and the names of columns from every result that the server returns and then pass them to the component I'm using, or create components like JTextFields for every column in a table and add them to the contentPane?

Are there any good guides on what GUI's should be like for end user database app's like this? Eg, the "home page" you get after logging in etc. ?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JTable pulls out the data from backing model and displays it (with the help of renderers) So when you want to display different data from the DB, all you need to do is change the backing model and provide custom renderers as required. For more details, check out http://docs.oracle.com/javase/tutorial/uiswing/components/table.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!