Font Size and Shape
Author |
Message |
rahman200012
|
Posted: Tue Jan 22, 2008 5:35 pm Post subject: Font Size and Shape |
|
|
My friend told me I could change the font and shape (ex Times New Roman, Comic Sans). He told me this statement:
c.setFont ("Comic Sans MS", Font.PLAIN, 25);
However this gave me an error. Any insight into this?
MY CLASS IS USING READY TO PROGRAM WITH JAVA VERSION 1.7. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
rahman200012
|
Posted: Tue Jan 22, 2008 5:44 pm Post subject: Re: Font Size and Shape |
|
|
[BUMP] sorry its pretty urgent >_< |
|
|
|
|
|
ericfourfour
|
Posted: Tue Jan 22, 2008 5:53 pm Post subject: RE:Font Size and Shape |
|
|
Just so you know, there is no need to bump. The unread posts are highlighted. Also, don't expect help in 11 minutes.
When you get an error, and you want help with it, you should post what error it is. |
|
|
|
|
|
HeavenAgain
|
Posted: Tue Jan 22, 2008 6:14 pm Post subject: RE:Font Size and Shape |
|
|
try this
code: | c.setFont (new Font("Comic Sans MS", Font.PLAIN, 25)); |
or
code: | Font font1 = new Font ("Comic Sans MS", Font.PLAIN, 25);
c.setFont(font1);
|
|
|
|
|
|
|
rahman200012
|
Posted: Tue Jan 22, 2008 6:16 pm Post subject: Re: Font Size and Shape |
|
|
thanks heaven that worked. But how do i store what i want to say in font1. |
|
|
|
|
|
HeavenAgain
|
Posted: Tue Jan 22, 2008 6:19 pm Post subject: RE:Font Size and Shape |
|
|
code: | c.drawString ("Hello rahman200012", width_here, height_here); |
but i could be wrong, since i NEVER used this console and ready to program in my entire life........ |
|
|
|
|
|
rahman200012
|
Posted: Tue Jan 22, 2008 6:20 pm Post subject: Re: Font Size and Shape |
|
|
k thanks for your help. |
|
|
|
|
|
|
|