very urgent need it in less than 1 hour 30 mins::::::Write an applet in Java that creates a yellow colored filled circle on screen. Inside this circle the word “GO” with Arial font and size 24, bold face needs to be printed. Justify your syntax.
please someone
If you have any problem with the code feel free to comment.
Program
import java.applet.Applet;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
public class Test extends Applet {
//paint method for printing in applet
@Override
public void paint(Graphics g) {
//setting paint color to yellow
g.setColor(Color.YELLOW);
//creating a fill circle at point(50, 50)
g.fillOval(50, 50, 110, 110);
//seting color to blue
g.setColor(Color.blue);
//setting font style
g.setFont(new Font("Arial", Font.BOLD, 24));
//printing the text inside the circle
g.drawString("Go", 90, 110);
}
}
Output
Get Answers For Free
Most questions answered within 1 hours.