Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Motorola setFont() Problem

807603Dec 5 2007 — edited Dec 5 2007
Hi everybody

Actually I'm still new in J2ME. I'm facing problem to setFont() for Motorola hp. Here is my sample codes:-

public MyScreen() {
setFullScreenMode(true);

font = Font.getDefaultFont();
Font_Height = font.getHeight();
bar_Height = Font_Height+6;

Font fontStyle = Font.getFont(Font.getFont(Font.FACE_MONOSPACE,
Font.STYLE_ITALIC, Font.SIZE_MEDIUM));
}


public void paint(Graphics g) {

g.setColor(0,0,0);
g.setFont(fontstyle);
g.drawString("HELLO", width/2, height/4, Graphics.TOP|Graphics.HCENTER);

}

Actually for the above codes, there is no problem to view the setFont style using Nokia hp. But only Motorola cannot show the right font style that I want, it just view the default font style. Somebody please help me.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2008
Added on Dec 5 2007
1 comment
96 views