j2me - little characters

H

Hugh Beyer

what is the command to use little characters in java midlets programming?

You have to ask pretty please.
javax.microedition.lcdui.Font.getFont() -- specify size as SIZE_SMALL.

Hugh
 
D

Darryl L. Pierce

Shearer said:
what is the command to use little characters in java midlets programming?

Do you mean lower case characters? There is no API for controlling what the
default text is on any handset.

--
/**
* @author Darryl L. Pierce <[email protected]>
* @see The J2ME FAQ <http://mypage.org/mcpierce/j2mefaq.html>
* @quote "What do you care what others think, Mr. Feynman?"
* @geek echo '$_ = "Jvtu bopuifs Pfsm ibdlfs."; y/a-z/za-y/; print' |
perl
*/
 
S

Shearer

I have programmed since yesterday, can you tell me a concrete example?
I have included javax.microedition.lcdui.*
I have tried ti do Font.getFont(SIZE_SMALL) but compilers give me error.

e:\Programmi\WTK104\apps\Fanizzi\src\Fanizzi.java:19: cannot resolve symbol

symbol : variable SIZE_SMALL

location: class Fanizzi

Font.setFont(SIZE_SMALL);

^

1 error
 
H

Hugh Beyer

I have programmed since yesterday, can you tell me a concrete example?
I have included javax.microedition.lcdui.*
I have tried ti do Font.getFont(SIZE_SMALL) but compilers give me error.

e:\Programmi\WTK104\apps\Fanizzi\src\Fanizzi.java:19: cannot resolve symbol

symbol : variable SIZE_SMALL

location: class Fanizzi

Font.setFont(SIZE_SMALL);

^

1 error

OK, but you do have the javadocs, don't you? You're not going anywhere
without them. I gave you shorthand-- the method is:

public static Font getFont(int face, int style, int size)

so the call is

Font.getFont(FACE_PROPORTIONAL, STYLE_PLAIN, SIZE_SMALL)

There are other options for face and style of course.

Note your code snippet above has a typo--it's calling "Font.setFont" not
"Font.getFont".

Hugh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top