• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PLS help me,Mark!!!

 
sparkle zou
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-------------------------------------------------
In theory, except for hooking into the Actions, I never send any method calls to the GUI. Now in the TablePanel, I do have one method called getTable which returns the JTable, so I can call setModel when I need to change the data in the JTable.
-------------------------------------------------
PLS help me,I don't know how to implement getTable() and setModel()!!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I have all my objects on the GUI as public, so I can do this
myGui.TablePanel.getTable()
getTable is a method in my TablePanel class that just returns the instance variable for the JTable.
setModel is a method of a JTable, it is built in.
Hope that helps
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic