java - JFrame not drawing -


i'm making pong game jframe it's not drawing.

package src;  import java.awt.color; import java.awt.graphics;  import javax.swing.*;  public class pong_game extends jframe{ public void init() {     settitle("pong");     setsize(500, 500);     setresizable(false);     setvisible(true); }  public void paintcomponent(graphics g) {      g.setcolor(color.black);      g.fillrect(0, 0, 500, 500); } } 

my window blank, why? 1 thing might worth noting paintcomponent method seems lot of people spell differently or use differently think did wrong.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -