java.awt.Graphics class provides many methods for graphics programming.

Commonly used methods of Graphics class:

  1. public abstract void drawString(String str, int x, int y): is used to draw the specified string.

Example of Graphics in applet:

  1. import java.applet.Applet;

myapplet.html

  1. <html>

https://www.tutorialandexample.com/features-of-java/

https://www.tutorialandexample.com/jdbc-program-in-java/

https://www.tutorialandexample.com/c-plus-plus-vs-java/

https://www.tutorialandexample.com/how-to-run-java-program-in-eclipse/

https://www.tutorialandexample.com/selection-sort-in-java/