Search:

Type: Posts; User: Norm

Search: Search took 0.29 seconds.

  1. Replies
    14
    Views
    1,084

    Re: paintComponent error

    You can do whatever you want.
  2. Replies
    14
    Views
    1,084

    Re: paintComponent error

    I don't understand you reasoning. If using @Override will have the compiler tell you if there is an error, isn't that better than not knowing there is an error without it?
  3. Replies
    14
    Views
    1,084

    Re: paintComponent error

    No. It's a good idea to have the compiler check if the code is correctly overriding methods.
  4. Replies
    14
    Views
    1,084

    Re: paintComponent error

    Use @Override when you want the compiler to check if the method you are coding overrides a method in a super class.
    It will prevent misspelling of method names and incorrect args for a method.
  5. Replies
    14
    Views
    1,084

    Re: paintComponent error

    For key listeners to work, the component needs to have the focus. There are several methods that will help the component get the focus. See the API doc for the Component class.
  6. Replies
    14
    Views
    1,084

    Re: paintComponent error

    Override the paintComponent() method in a Swing class object.

    There is no magic about using most method names in a class the does not extend any class. However using common method names like...
Results 1 to 6 of 6