Gaston7eze
05-26-2012, 12:54 PM
I dont know what's wrong with this !I have been trying and trying,but i dont know why it doesnt work,it says that it doesnt have a main type or something like that;
code:
package asd;
import javax.swing.JFrame;
import java.awt.*;
import java.awt.geom.*;
@SuppressWarnings("serial")
public class Lama extends JFrame {
public void run{
public void paint( Graphics g )
{
Graphics2D to = ( Graphics2D ) g;
to.setPaint( new GradientPaint( 5, 30, Color.BLUE, 35, 100,
Color.YELLOW, true ) );
to.fill( new Ellipse2D.Double( 5, 30, 65, 100 ) );
to.getColor();
}
}
}
code:
package asd;
import javax.swing.JFrame;
import java.awt.*;
import java.awt.geom.*;
@SuppressWarnings("serial")
public class Lama extends JFrame {
public void run{
public void paint( Graphics g )
{
Graphics2D to = ( Graphics2D ) g;
to.setPaint( new GradientPaint( 5, 30, Color.BLUE, 35, 100,
Color.YELLOW, true ) );
to.fill( new Ellipse2D.Double( 5, 30, 65, 100 ) );
to.getColor();
}
}
}