• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to define visible a JTable, but failing miserably.  RSS feed

 
Robson Martinz
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I'm trying to make a simple table with JTable class by reading the following tutorial but when try to see my JTable my program doesn't show me nothing! What i'm doing wrong?
http://docs.oracle.com/javase/tutorial/uiswing/components/table.html#renderer

 
Campbell Ritchie
Marshal
Posts: 55761
163
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where are you adding any of those components to a top‑level container?
 
Rob Camick
Ranch Hand
Posts: 2801
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to make a simple table with JTable class by reading the following tutorial


Then why doesn't your code look like the example code found in the tutorial?

In addition to the above comment, why doesn't your code use the SwingUtilties.invokeLater(...) to create and display the GUI. That code is used for a reason.

Take a look at the table of contents from your tutorial link and read the section on Concurrency to understand why it is important.

The point of reading tutorials is to follow the examples.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!