简体   繁体   中英

Changing the font size of a text field in applet

Is there any way to increase the font size of an applet?

TextField txtSentence = new TextField(60);

I need to increase the font size of txtSentence. Can somebody help please... Thanx in advance........

An AWT TextField inherits from Component which has the method Component.setFont(Font) .

Tips

  • AWT was the GUI component toolkit of last millennium. This millennium, use Swing.
  • Get used to looking in the JavaDocs for the class, as well as any class it implements or extends. Many answers are to be found there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM