NetBSD-Java archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
openjdk 1.7.0 attempt
I just had a go with jdk1.7.0-200905020i386-netBSD-5.0.tar.bz2 on a
5.99.12/i386 box, and my first swing programme:
import javax.swing.*;
public class hellow {
private static void gui() {
JFrame frame = new JFrame("title of frame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel label = new JLabel("Hello World!");
frame.getContentPane().add(label);
frame.pack();
frame.setVisible(true);
}
public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(
new Runnable() {
public void run() {
gui();
}
}
);
}
}
(javac hellow.class creates hellow.class and hello$1.class, then
setenv LD_LIBRARY_PATH /lib:/usr/lib:/usr/X11R7/lib
and:)
% java hellow
Exception in thread "AWT-EventQueue-0"
java.lang.ArrayIndexOutOfBoundsException: 0
at sun.awt.X11.XIconInfo.<init>(XIconInfo.java:74)
at sun.awt.X11.XWindowPeer.getDefaultIconInfo(XWindowPeer.java:406)
at sun.awt.X11.XWindowPeer.updateIconImages(XWindowPeer.java:308)
at sun.awt.X11.XWindowPeer.postInit(XWindowPeer.java:262)
at sun.awt.X11.XDecoratedPeer.postInit(XDecoratedPeer.java:91)
at sun.awt.X11.XFramePeer.postInit(XFramePeer.java:86)
at sun.awt.X11.XBaseWindow.init(XBaseWindow.java:185)
at sun.awt.X11.XBaseWindow.<init>(XBaseWindow.java:261)
at sun.awt.X11.XWindow.<init>(XWindow.java:127)
at sun.awt.X11.XComponentPeer.<init>(XComponentPeer.java:118)
at sun.awt.X11.XCanvasPeer.<init>(XCanvasPeer.java:43)
at sun.awt.X11.XPanelPeer.<init>(XPanelPeer.java:46)
at sun.awt.X11.XWindowPeer.<init>(XWindowPeer.java:109)
at sun.awt.X11.XDecoratedPeer.<init>(XDecoratedPeer.java:57)
at sun.awt.X11.XFramePeer.<init>(XFramePeer.java:54)
at sun.awt.X11.XToolkit.createFrame(XToolkit.java:389)
at java.awt.Frame.addNotify(Frame.java:476)
at java.awt.Window.pack(Window.java:710)
at hellow.gui(hellow.java:11)
at hellow.access$000(hellow.java:3)
at hellow$1.run(hellow.java:19)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:235)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:603)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)
So what can I try next? (Any ideas on using midp?)
Cheers,
Patrick
Home |
Main Index |
Thread Index |
Old Index