public void init() { super.init(); back = getImage(getClass().getResource("bits.jpg")); Font font = new Font("Serif", Font.BOLD, 20); setFont(font); fm = getFontMetrics(font); addKeyListener(new CharDrawer()); this.setSize(850, 650); }
public void paint(Graphics g) { g.drawImage(back, 0, 0, getWidth(), getHeight(), this); super.paint(g); }