cs_Nabel
Messages postés53Date d'inscriptionlundi 22 avril 2002StatutMembreDernière intervention19 août 2002
-
4 juin 2002 à 10:01
kimabaro
Messages postés2Date d'inscriptionvendredi 25 mars 2005StatutMembreDernière intervention 4 avril 2005
-
25 mars 2005 à 16:04
Bonjour,
Voilà mon problème : lorsque j'utilise la classe Graphics2d de java.awt.Graphics2D, mon applet ne s'affiche pas. Mon code est pourtant tout simple :
import java.applet.Applet;
import java.lang.*;
import java.awt.*;
import java.awt.geom.*;
public class Camembert extends Applet
{
public void init()
{
}
public void paint(Graphics g)
{
Graphics2D g2 = (Graphics2D)g;
g2.setColor(Color.red);
g2.fillRect(10,10,50,50);
g2.fill(new Arc2D.Double(10.0, 10.0, 90.0, 90.0, 270.0,35.5, Arc2D.PIE));
}
}
Et ça ne fonctionne pas, j'ai un carré tout gris sans rien dedans.
Si quelqu'un peut me dire, pourquoi ça ne fonctinne pas, ce serait sympa :)