🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.java.gui
1 messages
1 total messages Started by bruno nogent Mon, 29 Apr 2002 17:22
update method never called and repaint question ?
#27
Author: bruno nogent
Date: Mon, 29 Apr 2002 17:22
23 lines
1899 bytes
With this code, the update method is not called !!!
Why ?

How modify this code to repaint only the piece of the screen changed with a
double buffer ?

  public void mouseMoved(MouseEvent event) {
        x = event.getX();
        y = event.getY();
        repaint();
   }

    private int x = 0, y = 0;

    public void paint(Graphics g) {
        g.setColor(Color.green);
        g.fillRect(x, y, 50, 50);
    }

    public void update(Graphics screen) {
        System.out.println(++cpt);
        paint(screen);
    }
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads