Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 10-21-2006, 12:58 PM   #1 (permalink)
 
Newb Techie

Join Date: Dec 2005

Posts: 32

spectra

Default JAVA 2 Font command

Can someone PLEASE put me out of my misery on this? I am simply trying to change the font on JAVA method and am failing miserably.

The code below is compiling A.OK but but it's not changing the displayed font at all. gggrrrrrr.

Any help would be appreciated - as would an online beginners JAVA tutorial because my class at school just isn't cutting it !!!

private void text (Graphics g)

{
g.setColor(new Color(69,139,0));
Font f = new Font ("MonoSpaced",Font.BOLD,18);
g.drawString("Welcome to my world",150,140);
}
spectra is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On