# JClass BWT Examples

This file demonstrates all the BWT components:

- JCArrowButton
- JCButton
- JCCheckbox
- JCCheckboxGroup
- JCLabel
- JCList
- JCSlider
- JCTextArea
- JCTextField
- JCAlignerLayout
- JCScrolledWindow
- JCAlignerLayout

## JCLabel

This example demonstrates various types of JCLabels. Using JCStrings, you can easily create complex and attractive labels.

Source code

### Code

    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

This example demonstrates various types of JCButtons. Using JCStrings, you can easily create complex and attractive buttons. Callbacks allow you to change the appearance of a button when it is pushed.

Source code

### Code

    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);

## JCCheckbox

This example demonstrates various types of JCCheckboxes, and their use within a JCCheckboxGroup.

Source code

## JCList

This example demonstrates various types of JCLists.

Source code

## JCSlider

This example demonstrates the use of a JCSlider.

Source code

## JCScrolledWindow

This example demonstrates the JCScrolledWindow and the JCAlignerLayout. Simply create a window and add any component to it.

Source code

## JCTextArea and JCTextField

This example demonstrates the JCTextArea and JCTextField. and their usage in a form with a JCAlignerLayout.

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.

Source code