From dc2f886968cd92328b844d09f5673bd4ad579415 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sat, 15 Dec 2007 17:23:03 +0000 Subject: [PATCH] --- ase/test/awk/AseAwkPanel.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ase/test/awk/AseAwkPanel.java b/ase/test/awk/AseAwkPanel.java index 11b729ab..1ecc87e9 100644 --- a/ase/test/awk/AseAwkPanel.java +++ b/ase/test/awk/AseAwkPanel.java @@ -448,7 +448,21 @@ public class AseAwkPanel extends Panel implements DropTargetListener { public void itemStateChanged (ItemEvent e) { - String name = ((Checkbox)e.getItem()).getLabel(); + Object x = e.getItem(); + String name; + + if (x instanceof Checkbox) + { + // gcj + name = ((Checkbox)x).getLabel(); + } + else if (x instanceof String) + { + // standard jdk + name = (String)x; + } + else name = x.toString(); + for (int i = 0; i < options.length; i++) { if (options[i].getName().equals(name))