FileDocCategorySizeDatePackage
UnicodeApplet.javaAPI DocExample906Sun Mar 28 19:08:52 BST 1999None

UnicodeApplet

public class UnicodeApplet extends Applet implements ItemListener

Fields Summary
List
scripts
BlockCanvas
theChart
Constructors Summary
Methods Summary
public voidinit()


     

    setLayout(new BorderLayout());
    String[] names = CharacterBlock.getBlockNames();
    for (int i = 0; i < names.length; i++) {
      scripts.add(names[i]);
    }
    scripts.addItemListener(this);
    scripts.select(0);
    this.add("West", scripts);
    this.add("Center", theChart);
  
public voiditemStateChanged(java.awt.event.ItemEvent ie)

  
    if (ie.getStateChange() == ItemEvent.SELECTED) {
      String selected = scripts.getSelectedItem();
      if (!selected.equals(theChart.getBlock().getName())) {
        theChart.setBlock(CharacterBlock.getBlock(selected));      
      }
    }