Does Swing work with Kaffe?
Archie Cobbs
archie at whistle.com
Tue Mar 14 12:01:29 PST 2000
Neumann, Matthew C writes:
> I've gotten kaffe to run a "hello world" app for me, but I'm not having any
> luck getting it to work with Swing. It looks like it's looking for some
> defaults it can't find; how can I set those explictly so that this'll work?
>
> Simple code:
> ewsh08:.m/kaffe> cat HelloWorldAppSwing.java
> import javax.swing.*;
> class HelloWorldAppSwing {
> public static void main (String args[]) {
> JOptionPane.showMessageDialog(null,"Hello World!","hello,
> world", JOptionPane.INFORMATION_MESSAGE);
> }
> }
>
> I'm on an HP-UX v10 OS, BTW.
>
> This is the crash message I get:
>
> ewsh08:.m/kaffe> bin/java HelloWorldAppSwing
> java.lang.IllegalMonitorStateException
> at javax.swing.UIDefaults.get(UIDefaults.java:146)
> at javax.swing.MultiUIDefaults.get(MultiUIDefaults.java:50)
For what it's worth.. I get a different exception with the
current kaffe CVS:
$ kaffe HelloWorldAppSwing
warning: running 1.2 version of SwingUtilities
java.lang.NoSuchMethodError: java/awt/Component.getComponentOrientation()Ljava/awt/ComponentOrientation;
at javax.swing.SwingUtilities.layoutCompoundLabel(SwingUtilities.java:751)
at javax.swing.plaf.basic.BasicGraphicsUtils.getPreferredButtonSize(BasicGraphicsUtils.java:270)
at javax.swing.plaf.basic.BasicButtonUI.getPreferredSize(BasicButtonUI.java:314)
at javax.swing.plaf.basic.BasicButtonUI.getMinimumSize(BasicButtonUI.java:309)
at javax.swing.JComponent.getMinimumSize(JComponent.java:784)
at javax.swing.plaf.basic.BasicOptionPaneUI.addButtonComponents(BasicOptionPaneUI.java:579)
at javax.swing.plaf.basic.BasicOptionPaneUI.createButtonArea(BasicOptionPaneUI.java:525)
at javax.swing.plaf.basic.BasicOptionPaneUI.installComponents(BasicOptionPaneUI.java:133)
at javax.swing.plaf.basic.BasicOptionPaneUI.installUI(BasicOptionPaneUI.java:95)
at javax.swing.JComponent.setUI(JComponent.java:253)
at javax.swing.JOptionPane.setUI(JOptionPane.java:1291)
at javax.swing.JOptionPane.updateUI(JOptionPane.java:1313)
at javax.swing.JOptionPane.<init>(JOptionPane.java:1276)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:627)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:495)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:475)
at HelloWorldAppSwing.main(HelloWorldAppSwing.java:4)
-Archie
___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
More information about the kaffe
mailing list