JCLabel label = new JCLabel("Simple label"); label = new JCLabel("Multi-line\nLabel"); JCString s = JCString.parse(this, "[IMG=../images/smile32.gif]\nImages and Text"); label = new JCLabel(s); s = JCString.parse(this, "[IMG=../images/smile32.gif][HORIZ_SPACE=10][ALIGN=MIDDLE]Image"); label = new JCLabel(s); label = new JCLabel(); s = JCString.parse(this, "Mix images [IMG=../images/cut16.gif], [COLOR=red]colors,\n[RESET][font=TimesRoman-ITALIC-20]fonts,[DEFAULT_FONT]\n [ST]Mistakes[/ST],\n even URLs: [href=http://www.klg.com/jclass]KL's JClass page[/href]"); label.setLabel(s);
JCButton button = new JCButton("Simple button", this, "btn1"); button = new JCButton("Multi-line\nButton"); Image im = JCUtilConverter.toImage(this, "../images/smile32.gif"); button = new JCButton(im); JCString s1 = JCString.parse(this, "[IMG=../images/smile32.gif]\nImages and Text"); button = new JCButton(s1); button = new JCButton(); s1 = JCString.parse(this, "[IMG=../images/smile32.gif][HORIZ_SPACE=10][ALIGN=MIDDLE]Push Me"); button.setLabel(s1); JCString s2 = JCString.parse(this, "[IMG=../images/sad32.gif][HORIZ_SPACE=10][ALIGN=MIDDLE]I'm Pushed"); button.setArmLabel(s2);
Fields may be left, center or right-justified. A number of events allow the application to provide feedback while the user types, to allow the creation of masked fields such as the phone number entry area.