GCC Bugzilla will be upgraded from version 4.4.9 to 5.0rc3 on Saturday, April 25, starting around 17:00 UTC. The upgrade process should only last a few minutes. Check bug 64968 for details.
Bug 22981 - swing: javax.swing.JInternalFrame.setDefaultCloseOperation(EXIT_ON_CLOSE) not handled
swing: javax.swing.JInternalFrame.setDefaultCloseOperation(EXIT_ON_CLOSE) not...
Product: classpath
Classification: Unclassified
Component: classpath
: P3 normal
: ---
Assigned To: Not yet assigned to anyone
Depends on:
  Show dependency treegraph
Reported: 2005-06-16 09:16 UTC by from-classpath
Modified: 2005-07-23 22:54 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description from-classpath 2005-06-16 09:16:57 UTC
Steps to reproduce:
1. Run the attached testcase.

Expected results:
1. Program exits sucessfully

Actual results:
1. Following exception is thrown:
java.lang.Error: Close operation must be one of DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE
   at javax.swing.JInternalFrame.setDefaultCloseOperation (JInternalFrame.java:1291)
   at testcase.<init> (testcase.java:8)
   at testcase.main (testcase.java:5)

import javax.swing.*;
import java.awt.*;
public class testcase extends JInternalFrame {
        public static void main(String[] args) {
                (new testcase()).show();
        public testcase() {
Comment 1 from-classpath 2005-06-16 17:53:37 UTC
Why is this an error?  I don't believe EXIT_ON_CLOSE is valid for JInternalFrame.

EXIT_ON_CLOSE is specific to JFrames.
Comment 2 from-classpath 2005-06-16 19:16:42 UTC
I have seen something similar in JDialog and or JFrame. Invalid values should not throw an exception but should instead be swallowed and lead to the default behaviour, AFAICR.
Comment 3 from-classpath 2005-06-24 09:17:17 UTC
No exception seems to be thrown anymore.