Drawing text
Appearance
From Wikibooks, open books for an open world
This is the current revision of this page, as edited by DannyS712 (discuss | contribs) at 05:39, 16 April 2020 (Update syntaxhighlight tags - remove use of deprecated <source> tags). The present address (URL) is a permanent link to this version.
Navigate User Interface topic:()
Computer code
Code listing 9.5: Drawing text
publicclass MyCanvasextendsCanvas{ publicvoidinit(){ setFont("Times New Roman",Font.PLAIN,24); setColor(Color.white); setBackGroundColor(Color.black); setLayout(newGridLayout()); add(label); add(button); } }