harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klaus Reimer...@ailis.de>
Subject Freeze on JFrame pack
Date Wed, 01 Dec 2010 08:33:37 GMT
Hello,

I don't know the current state of the harmony project but isn't a simple
program like this supposed to work?

    public static void main(final String[] args)
    {
        final JFrame frame = new JFrame();
	frame.setPreferredSize(new Dimension(512, 512));
        frame.pack();
        frame.setVisible(true);
    }

Compiling it with harmony and running it with some other Runtime works
fine but when I run it with the harmony runtime then the program freezes
in the pack() line. When I remove pack() then it freezes in
setVisible(). When I debug the program instead trying to find the line
in the Harmony JRE code which causes the freeze than I get a different
behavior: It crashes with a NPE:

java.lang.NullPointerException
	at java.awt.Window.pack(Window.java:659)
	at FrameTest.main(FrameTest.java:27)


So what's the problem here? Is Swing simply not implemented in Harmony
or is it an OS-dependent bug? I'm using Ubuntu Linux 10.10 64 bit and
installed the Harmony 64 bit Debian packages provided on harmony.apache.org.

-- 
Bye, K <http://www.ailis.de/~k/>
[A735 47EC D87B 1F15 C1E9 53D3 AA03 6173 A723 E391]
(Finger k@ailis.de to get public key)

Mime
View raw message