This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with displaing a JTable  RSS feed

 
Kristi Hallam
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, this is probably a stupid question....
I have created a simple JTable to hold values of type Long. I do not need any fancy scrolling or buttons or anything. All I want to do is display the table. How do I do this???
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum, where they love to get all messy with thie GUI stuff...
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The best thing to do is start with this tutorial on creating a JFrame. Then you can just add your JTable to the JFrame's contentPane.
If you have problems with getting a JFrame going, let us know.
 
Kristi Hallam
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the help. The window appears....now I just have to figure out what is wrong with the JTable that is supposed to appear in the window.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kristi Hallam:
Thank you for the help. The window appears....now I just have to figure out what is wrong with the JTable that is supposed to appear in the window.

If you want to show us your code we can probably help you figure it out.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!