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
Post a Comment