@Override
        public void paint(Graphics g) {
            NesPPU ppu = emulator.getPPU();
            if (ppu != null) {
                Image img = createImage(new MemoryImageSource(NesPPU.WIDTH, NesPPU.HEIGHT, ppu.getFrameBuffer(), 0, NesPPU.WIDTH));
                g.drawImage(img, 0, 0, NesPPU.WIDTH * scale, NesPPU.HEIGHT * scale, null);
            } else {
                g.setColor(Color.black);
                g.fillRect(0, 0, getWidth(), getHeight());
                g.setColor(Color.white);
                g.setFont(monoFont);
                fm = g.getFontMetrics();
                int w = fm.stringWidth("NENHUMA ROM CARREGADA");
                int h = fm.getAscent();
                g.drawString("NENHUMA ROM CARREGADA", 0, (NesPPU.HEIGHT * scale) - h);
            }

        }