A voir également:
- JAVA
- Jeux java itel touche - Télécharger - Jeux vidéo
- Waptrick java football - Télécharger - Jeux vidéo
- Jeux gratuits sur mobile ✓ - Forum Logiciels
- Java apk - Télécharger - Langages
- Jeux java itel 5360 - Forum Mobile
3 réponses
Salut!
Soit en créant une image et en récupérant l'objet Graphics:
Soit en overridant la méthode paint(Graphics g) d'un composant:
Ça dépend de l'usage que tu veux faire de l'Objet Graphics
;-)
Soit en créant une image et en récupérant l'objet Graphics:
BufferedImage image = new BufferedImage(640,480,BufferedImage.TYPE_INT_ARGB); Graphics g = image.getGraphics(); g.setColor(Color.RED); g.fillRect(100,100,200,200); ...
Soit en overridant la méthode paint(Graphics g) d'un composant:
JPanel myPanel = new JPanel(){
@Override
public void paint(Graphics g){
g.setColor(Color.RED);
g.fillRect(100,100,200,200);
...
}
};
Ça dépend de l'usage que tu veux faire de l'Objet Graphics
;-)