Gaston7eze
2012-05-26 08:49:07
Hello guys,what's up?
I have been trying to draw something in java,but it says me that i dont have a main type or something like that ….
Here is the code,what should i do?
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();
}
}
}
I have been trying to draw something in java,but it says me that i dont have a main type or something like that ….
Here is the code,what should i do?
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();
}
}
}