Can we chang开发者_JAVA技巧e the siz,style,etc of the font (javax.microedition.lcdui.Font) in j2me
@org.life.java That be true that there isn't a set size method..... that being said there isn't a "setSubstring" method either.
Strings as with fonts in J2me are immutable http://en.wikipedia.org/wiki/Immutable_object so simply create a new font with the desired properties....
http://download.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/index.html
So instead of
myfon.setSize(Font.SIZE_SMALL)
Do
myFont = Font.getFont(myFont.getFontFace(), myFont.getFontStyle(), Font.SIZE_MEDIUM)
That would work.
精彩评论