Search:

Type: Posts; User: javapenguin

Search: Search took 0.06 seconds.

  1. Re: exception in "main" java.lang.NullPointerException

    Sorry. I knew that == compares memory locations, but I guess that == would be ok in this case.

    However, the variable f isn't initialized so it's throwing the Null Pointer Exception on the first...
  2. Re: exception in "main" java.lang.NullPointerException

    You never initialized the variable f. That's why it's throwing that exception.

    Also, when comparing objects like JButtons or Strings, use .equals(Object obj) method instead of ==.
Results 1 to 2 of 2