• 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: 17309
11
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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!