Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    11
    Views
    1,686

    Re: java GUI , reading in files

    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
  2. Replies
    11
    Views
    1,686

    Re: java GUI , reading in files

    What happens when you compile and execute the code?
  3. Replies
    11
    Views
    1,686

    Re: java GUI , reading in files

    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...
  4. Replies
    11
    Views
    1,686

    Re: java GUI , reading in files

    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...
  5. Replies
    11
    Views
    1,686

    Re: java GUI , reading in files

    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...
  6. Replies
    11
    Views
    1,686

    Re: java GUI , reading in files

    Can you explain what the problem is?
Results 1 to 6 of 6