Ajouter un commentaire

fredericmazue

Belle contrib, y a pas à dire.
Merci, Niroken de tes nombreux et consistents apports à ce forum :)

Me permets tu une petite remarque toutefois ?
J'ai vu que tu redéfinis la méthode paint pour dessiner dans un JPanel. Sun recommande de rédéfinir la méthde paintComponent plutôt.

C'est par exemple expliqué ici:

http://java.sun.com/products/jfc/tsc/articles/painting/#callback

En voici un extrait:

Quote:
Swing programs should override paintComponent() instead of overriding paint(). Although the API allows it, there is generally no reason to override paintBorder() or paintComponents() (and if you do, make sure you know what you're doing!). This factoring makes it easier for programs to override only the portion of the painting which they need to extend. For example, this solves the AWT problem mentioned previously where a failure to invoke super.paint() prevented any lightweight children from appearing.

Ceci soit dit sans diminuer ta contribution pour laquelle je te remercie à nouveau.

Filtered HTML

Plain text

CAPTCHA
Cette question permet de vérifier que vous n'êtes pas un robot spammeur :-)
 X   X   SSS   V     V  III  BBBB  
X X S V V I B B
X SSS V V I BBBB
X X S V V I B B
X X SSSS V III BBBB