• Post Reply Bookmark Topic Watch Topic
  • New Topic

help with JTable  RSS feed

 
Talal Mohammed
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i currently have is a JTable in my GUI class i initialised the JTable like this:



however through this way i can only assign the row data and columntitle if those two variables are assigned in the gui class
what i want is for me to be able to assign the rowData and column title at the main class.
is it possible?
i tried assigning the table to nothing and then at the main class assigning it to the rowdata, and columntitle however it did not work.
 
Haina Minawa
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So create two member variables rowData1 and columnTitle in your GUI class, adding also getters and setters. In the main class, call the setters to set value for rowData1 and columnTitle.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!