Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying database in a GUI  RSS feed

 
Chase Becicka
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay first Im not completely sure this goes in here so I apologize if I made a mistake but anyway here we go. I have been working on a database program which stores calles and sorts the infomation stored in the database. I was finally able to get it working but my problem is this I can't get the database to show up in a window, for my program I have buttons allowing you to move forward and backward in the result set but I havent been able to find and swing type componet in which to display a small window that would allow me to see the database enteries, Im working with the JOptionPane class in the swing package as my GUI, and I have been scowering the API trying to find a method or class to work off of and apply to my program. If anyone knows of a class or method in the javax.swing package which will allow me to display a window into my database please let me know and if I need to start searching the SQL package could you point me in that direction.
 
Jason Steele
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, your question is a bit broad, but I believe what you want to do is display the contents of a database table in a tabular layout. If this assumption is correct, then you will want to use JTable. Also, you may want to check out the JDBC API.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!