This is what I have done so far.
import java.applet.Applet;
import java.awt.*;
public class myFirstAppletRun extends Applet
{public void paint (Graphics page)
{
page.drawLine(100, 0, 100, 600);
page.fillArc(7, 234, 115, 100, -20, 180);
}
}
How would I modify it so that it runs as an applet using Java Graphics2D
because i would like to use the BasicStroke
method found only in Graphics2D
. When I enter BasicStroke
method into this current block of code, I get an error. Can someone please modify the code to show me what I would need to do if I would like to make the line and the arc above thicker? Or maybe guide me through the use of casting. (Please note that I have called it Graphics page, and not Graphics g.) Thank you.