Share via


Overview | Methods | This Package | All Packages

OverviewMethodsThis PackageAll Packages

Graphics.drawString

Draws a string at the specified point or within the specified area.

Syntax

public final void drawString( String s**, Point** p )

public final void drawString( String s**, Point** p**, int** format )

public final void drawString( String s**, int** x**, int** y )

public final void drawString( String s**, int** x**, int** y**, int** format )

public final void drawString( String s**, Rectangle** rect**, int** format )

public final void drawString( String s**, int** x**, int** y**, int** width**, int** height**, int** format )

public final void drawString( String s**, Point** p**, int[]** tabStops )

public final void drawString( String s**, int** x**, int** y**, int[]** tabStops )

Parameters

s

The string to draw.

p

A Point object that specifies the point at which to draw the string.

x

The x-coordinate at which to draw the string.

y

The y-coordinate at which to draw the string.

width

The width of the area in which to draw the string

height

The height of the area in which to draw the string.

rect

A Rectangle object that specifies the area in which to draw the string.

format

One or more flags that describe how to format the string. This value must be one of the enumeration constants defined in the TextFormat class.

tabStops

An array of tab positions. If the array contains a single value, that value is used for all tab stops. If tabStops is null, a default value of 8 is used for the tab width.

Remarks

The string specified in s is drawn using the current font.