graphics class

Graphics: drawString Method in Java

Submitted by donbermoy on
Today in Java, i will teach you how to create java program that will have the drawString method in creating graphics in applet. The drawString() method, takes as parameters an instance of the String class containing the text to be drawn, and two integer values specifying the coordinates where the text is placed (x and y coordinates in the screen). So, now let's start this tutorial! 1. Open JCreator or NetBeans and make a java program with a file name of drawString.java. In the classname, extend a java.applet.Applet to have an applet library. 2.