Another window management bug
I've just reported this at the JDC. It seems to be specific to Linux,
and affects both the Blackdown and Sun versions of 1.3.1.
Ron
...
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
Compile and run the enclosed program. It creates a JFrame containing a
button. The first time the button is pressed a JDialog is created
containing a cancel button. Pressing the cancel button hides the
JDialog. Pressing the button in the JFrame again shows the JDialog.
This works as expected on all platforms and versions of Java that I've
tried (including 1.4.0beta2 on Linux), except on Linux with Java 1.3.1
and 1.3.1_01. In these versions the JDialog is iconified when it
reappears.
import javax.swing.*;
import java.awt.event.*;
public class DialogBug extends JFrame {
JDialog dialog ;
public DialogBug() {
super("DialogBug") ;
JButton button = new JButton("Press me") ;
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if ( dialog == null ) {
dialog = new MyDialog(DialogBug.this) ;
}
dialog.setVisible(true) ;
}});
getContentPane().add(button) ;
pack() ;
show() ;
}
public static void main(String[] args) {
new DialogBug() ;
}
private class MyDialog extends JDialog {
public MyDialog(JFrame frame) {
super(frame, "Dialog") ;
JButton cancel = new JButton("Cancel") ;
cancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
MyDialog.this.setVisible(false) ;
}});
getContentPane().add(cancel, "Center") ;
pack() ;
}
}
}
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Another window management bug
Replying to my own message about Jdialogs being iconified after show/hide/show: it seems that this is a known bug, 4392518, Incorrect window (Swing) handling with Gnome/enlightenment. In their wisdom Sun have decided that fixing it in the still-to-be-released merlin (1.4.0) is good enough, so they've closed the bug. Even though it's still present in the current production release. And people are stumbling into it, wasting time looking for bugs in their own code, then documenting it and reporting it as a bug. Pah. Ron Who awaits 1.4.0 in the hope, though hardly expectation, that it might finally fix 4102292, New AWT Frame w/o coordinates always pops up in upper left hand screen location. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Another window management bug
I wrote: >Replying to my own message about Jdialogs being iconified after show/hide/show: >it seems that this is a known bug, 4392518, Incorrect window (Swing) handling >with Gnome/enlightenment. Just shows how wrong I can be. Sun have accepted my report as a new bug: 4509276 JDialog which is hidden then shown appears iconified. I also wrote: >Ron > >Who awaits 1.4.0 in the hope, though hardly expectation, that it might finally >fix 4102292, New AWT Frame w/o coordinates always pops up in upper left hand >screen location. Still, I'm not wrong about everything. I was right to be sceptical about Sun's attitude to 4102292. Since March this year it's been listed as 'commit to Merlin'. Now it's changed to 'commit to Tiger'. So goodness only knows when it'll get fixed now. What's up with Sun? Do they all use Microsoft Windows there? Ron -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: modal dialogs in 1.4
There is a bug report in the JDC Bug Database concerning window management problems with KDE (4392053). It's second in the Top 25 Bugs with 335 votes. According to the evaluation KDE is not a supported configuration. So if things don't work, tough. Just another instance of Sun's idiotic attitude to support for Unix window managers. See also 4102292, fifth in the Top 25. Ron -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
