• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with program using arrays in jtable (gui)  RSS feed

 
mitchell cooper
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is wrong with my code its getting error message on line 104 saying " ) expected " ?

 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is wrong with my code its getting error message on line 104 saying " ) expected " ?

At the risk of sounding flippant the thing that is wrong with your code is you are missing a ')' - as the compiler message says.
If you look at the block of code in question:

You will see the invokeLater method has an opening bracket but no closing bracket. Once you've added the closing bracket you'll find you are also missing a ';'.
 
K. Tsang
Bartender
Posts: 3648
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you didn't typed/copied wrong, line 104 currently is a closing brace } rather than a closing paren )
 
mitchell cooper
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for that now it runs but the array does not show in my table ?
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the constructor comment out the line:
initComponents();

run the program and resize the window so you can see the table full of data. Now look back at your program and see if you can work out why you now have a table full of data but when you call initComponents() you get an empty table.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!