Couple of solutions:
pass the reference to the model: m to the listener's constructor and save it in the listener's class.
Make the listener class an inner class
Type: Posts; User: Norm
Couple of solutions:
pass the reference to the model: m to the listener's constructor and save it in the listener's class.
Make the listener class an inner class
What happens when you compile and execute the code?
A static variable is used when you only want there to be only one variable that all instances of a class can share.
You don't normally make a class variable static. A variable defined as a class...
Why are you declaring and creating a Model object inside a method? What code wants to use the data the readFromFile() method gets from the file?
Can you declare it outside of the method and use it...
What is wrong with the way the data is read? Is the reading done in the readFromFile() method? What does it do incorrectly?
The variable: m defined inside the listener will go away when the...
Can you explain what the problem is?