DrawString

Graphics: drawString Method in Java

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.

Drawing Strings via the Graphics Object in C#

Introduction:

This tutorial is on how to draw text in .NET (C#/Visual Basic).

Labels, Textboxes?

I'm sure if you've not looked in to the 'graphics' (etc) objects in the .NET framework, you're thinking, why don't we just use labels or textboxes with their read-only property enabled. Labels and textboxes both have a surrounding area around the text which are both of different colours (however we could change this to the form background colour to give the effect of the backgrounds being removed), but would we create extra controls (labels, and textboxes) when we don't need to?