ES QUE NECESITO UNA FORMA DE PAINT EN JAVA QUE TE DIBUJE MUY SENCILLO UN CIRCULO, RECTANGULO CUADRADO, FIGURAS GEOMETRICAS CON EL METODO
Graphics g=getGraphics() POR FAVOR AYUDA
¿Tu te has pasado a mirar tan solo la documentación de Java para la clase Graphics?
http://download.oracle.com/javase/1.4.2/docs/api/java/awt/Graphics.html
abstract void drawOval(int x, int y, int width, int height)
abstract void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
void drawPolygon(Polygon p)
abstract void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
void drawRect(int x, int y, int width, int height)
abstract void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
Y no escribas en mayúsculas, implica grito.
Salu2
Un circulo
g.fillOval(0, 0, 240, 240);
Un Cuadrado
g.fillRect(220, 60, 120, 120);
Un triangulo
g.drawLine(320, 100, 320+(130/2), 100+230);
g.drawLine(320+(130/2), 100+230, 320-(130/2), 100+230);
g.drawLine(320,100,320-(130/2), 100+230);
Un rectángulo
g.drawRect( 100,100,300,200 );
Coloca un MouseListener a frame y obtienes las coordenadas x , y y luego pintas.
Aquí tienes un applet con su respectivo fuente
:http://www.chuidiang.com/java/codigo_descargable/appletpaint.php
Un saludo.
@MARYPRINCE: Y principalmente porque he leído el mensaje que pusiste, que veo que ya borraron.
Te puse no solo el enlace hacia la documentación (que te podría haber dado simplemente eso, porque no es difícil encontrar los métodos ni mucho menos), sino además los métodos que tienes disponibles para hacer lo que buscas.
Otra cosa es que busques a alguien que te construya directamente el paint, y en el foro se ha dicho en muchas ocasiones que no se hacen tareas (porque esto huele a una).
Salu2
A pesar de que lo han hecho, tienes que saber que esta prohibido pedir tareas...
No todo el mundo es tan bueno como los que te han ayudado.
Saludos