Why is this JFrame dead?

Hi,

Why is this attached JFrame dead?
It should show 10 blue circles, randomly

Thanks
gameWindow.java
beavoidAsked:
Who is Participating?
 
CEHJConnect With a Mentor Commented:
 public void paint() {

Open in new window


Will never be called as it has the wrong prototype. Should be

 public void paint(Graphics G) {

Open in new window


but variable names should begin lower case
0
 
beavoidAuthor Commented:
Thank you

Below is the living JFrame




import java.awt.*;

import javax.swing.*;




public class gameWindow extends JFrame {
      
      public gameWindow() {
            
            
            this.setSize(400, 400);
            
            this.setVisible(true);
            
            
      }
      
      public void paint(Graphics G) {
            
            G.setColor(Color.blue);
            G.fillRect(0, 0, 400, 400);
            
      }
      
      
      public static void main( String args[]) {
            
            new gameWindow();
      }
      
      
}
0
 
CEHJCommented:
:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.