← Back to team overview

openjdk team mailing list archive

[Bug 308826] Re: netbeans sample application dispose()

 

I was able to generate the same error on my Ubuntu 9.xx version.
However, I changed the code little bit under
<Application_Name>View.java. It creates a piece of code by default for
about box:


public void showAboutBox() {
    if (aboutBox == null) {
        JFrame mainFrame =  <Application_Name>App.getApplication().getMainFrame();
        aboutBox = new  <Application_Name>AboutBox(mainFrame);
        aboutBox.setLocationRelativeTo(mainFrame);    
    }
    <Application_Name>App.getApplication().show(aboutBox);
}
I changed this code as follows to rectify the error:

public void showAboutBox() {
        JFrame mainFrame = <Application_Name>App.getApplication().getMainFrame();
        aboutBox = new  <Application_Name>AboutBox(mainFrame);
        aboutBox.setLocationRelativeTo(mainFrame);    
        aboutBox.setVisible(true);  
}

-- 
netbeans sample application dispose()
https://bugs.launchpad.net/bugs/308826
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in ubuntu.

Status in “openjdk-6” package in Ubuntu: Incomplete

Bug description:
I am not sure if this bug is with openjdk or netbeans.  I am using netbeans 6.5 with default openjdk that comes with Ubuntu 8.10.  The bug can be reproduced by creating a Java Desktop Application (sample application).  After you execute the sample application, hit help->About inside of the sample application.  When you hit the x in the top corner of the about dialog box to close it, it causes a StackOverflowError.  This error is also produced if you build the project into an executable jar file and run it independent of netbeans.  This error does not occur with sun's java that comes with Ubuntu 8.10.  The error seems to occur when dispose is called on the child JFrame.  I was not able to create a simple application, not produced by netbean's code generation, that caused the error (with sun's java or openjdk); thus the confusion of whether the error lies in netbeans or openjdk.



References