public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug AWT/19861] New: Swing JOptionPane without parent frame
@ 2005-02-09 17:48 hendrich at informatik dot uni-hamburg dot de
  2005-02-12 23:06 ` [Bug SWING/19861] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hendrich at informatik dot uni-hamburg dot de @ 2005-02-09 17:48 UTC (permalink / raw)
  To: java-prs

The following testcase shows a (subtle) problem in the Swing rendering strategy.
A JOptionPane dialog without any parent works fine, but a JOptionPane
attached to a non-showing parent (e.g. JFrame) fails with an 
IllegalComponentStateException. Because the Exception blocks the Swing
redraw thread, there is no way to recover from the illegal state.

(both dialog windows work fine under JDK 1.4.2, not tested with other versions).


/* NoParentJOptionPane.java
 *
 * demonstrates GCJ doesn't like dialogs without visible parents...
 *
 * (C) 2005 FNH
 */

import java.awt.*;
import javax.swing.*;

public class NoParentJOptionPane {

  public static void main( String args[] ) {
    String s = "Testing JOptionPane w/o parent...";

    System.out.println( "The first call works: null parent:" );
    JOptionPane.showMessageDialog( null, s );

    // JDK1.4+ runs this, gcj complains about:
    // java.awt.IllegalComponentStateException: component not showing
    // at java.awt.Component.getLocationOnScreen() 
    // at javax.swing.SwingUtilities.convertPointToScreen(java.awt.Point,
java.awt.Component) 
    // at javax.swing.SwingUtilities.convertPoint(java.awt.Component, int, int,
java.awt.Component) (/usr/lib/lib-javax-swing.so.0.0.0)
    // ...
    JFrame frame = new JFrame( "just a hidden frame" );

    System.out.println( "The second call is broken: frame parent" );
    JOptionPane.showMessageDialog( frame, s );

    System.exit( 0 );
  }

}

-- 
           Summary: Swing JOptionPane without parent frame
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: AWT
        AssignedTo: fitzsim at redhat dot com
        ReportedBy: hendrich at informatik dot uni-hamburg dot de
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19861


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug SWING/19861] Swing JOptionPane without parent frame
  2005-02-09 17:48 [Bug AWT/19861] New: Swing JOptionPane without parent frame hendrich at informatik dot uni-hamburg dot de
@ 2005-02-12 23:06 ` pinskia at gcc dot gnu dot org
  2005-06-03 14:48 ` roman at kennke dot org
  2005-08-24 19:30 ` [Bug swing/19861] " fitzsim at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-12 23:06 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-12 22:35 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|AWT                         |SWING
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-12 22:35:35
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19861


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug SWING/19861] Swing JOptionPane without parent frame
  2005-02-09 17:48 [Bug AWT/19861] New: Swing JOptionPane without parent frame hendrich at informatik dot uni-hamburg dot de
  2005-02-12 23:06 ` [Bug SWING/19861] " pinskia at gcc dot gnu dot org
@ 2005-06-03 14:48 ` roman at kennke dot org
  2005-08-24 19:30 ` [Bug swing/19861] " fitzsim at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: roman at kennke dot org @ 2005-06-03 14:48 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From roman at kennke dot org  2005-06-03 14:48 -------
I have checked in a fix for that some days ago in GNU Classpath.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19861


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug swing/19861] Swing JOptionPane without parent frame
  2005-02-09 17:48 [Bug AWT/19861] New: Swing JOptionPane without parent frame hendrich at informatik dot uni-hamburg dot de
  2005-02-12 23:06 ` [Bug SWING/19861] " pinskia at gcc dot gnu dot org
  2005-06-03 14:48 ` roman at kennke dot org
@ 2005-08-24 19:30 ` fitzsim at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fitzsim at redhat dot com @ 2005-08-24 19:30 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From fitzsim at redhat dot com  2005-08-24 19:29 -------
Fixed.  Closing.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19861


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-24 19:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-09 17:48 [Bug AWT/19861] New: Swing JOptionPane without parent frame hendrich at informatik dot uni-hamburg dot de
2005-02-12 23:06 ` [Bug SWING/19861] " pinskia at gcc dot gnu dot org
2005-06-03 14:48 ` roman at kennke dot org
2005-08-24 19:30 ` [Bug swing/19861] " fitzsim at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).