Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Re: For some reason, I am getting a grey background rather than the 'CYAN' I have coded.

    Define a class that extends the JPanel class.
    Override that class's paintComponent() method
    Move the code that is in your paint() method to the paintComponent() method
    Create an instance of the...
  2. Re: For some reason, I am getting a grey background rather than the 'CYAN' I have coded.

    Problems I see:
    Overriding the JFrame's paint method instead of adding a JPanel and overriding its paintComponent() method.
    Assuming 750,750 is on the screen.
    Not calling super method in paint
Results 1 to 2 of 2