If this is the problem with dialogs showing up iconified the second
time that they are displayed, it is not limited to fvwm i have it
under windowmaker as well and yes, it's still there. I think it
does not happen under the IBM jdk or 1.4 however.

-----Original Message-----
From: Greg Wolodkin [mailto:[EMAIL PROTECTED]]
Sent: February 7, 2002 8:30 AM
To: [EMAIL PROTECTED]
Subject: Issues with setLocation/setSize and fvwm/fvwm2



Anyone familiar with these two bugs?

  http://developer.java.sun.com/developer/bugParade/bugs/4395578.html
  http://developer.java.sun.com/developer/bugParade/bugs/4392053.html

I can still reproduce them in FCS-02a using fvwm and fvwm2.  Below is
an example to illustrate.  If I switch to say icewm then back to fvwm2,
things work OK.  Are we getting it right for most window managers, but
not fvwm?  Or is fvwm not giving us enough information to get it right?

We've tangled with this issue before in MATLAB, and have code to get
the insets right across the board.  Before I dig into the VM and start
poking around I thought I'd ask here if anyone had any advice or pointers
into the code.

Thanks for any thoughts or info --
Greg

/* --------------------------------------- */

/*
 * Initial dialog should be 400x300.
 * Resized dialog should be 600x400.
 * With Java2 and fvwm, its often wildly wrong
 */

import java.awt.*;
import java.awt.event.*;

public class DialogTest {

    static Frame  f;
    static Dialog d;

        public static void main(String[] args) {

        // Create frame
                f = new Frame("Dialog Test");
        f.setLayout(new FlowLayout());
        f.setLocation(100,100);
        f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });

        // Add buttons to frame
        Button b = new Button("Show Dialog");
        b.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (d != null) return;
                // Create dialog
                d = new Dialog(f,"Test");
                d.addWindowListener(new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        d.dispose();
                        d = null;
                    }
                });
                d.setLocation(200,200);
                d.setSize    (400,300);

                // Add button to dialog
                Button b1 = new Button("Hide Dialog");
                b1.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        d.dispose();
                        d = null;
                    }
                });
                d.add(b1);

                // Show the dialog
                d.setVisible (true);
            }
        });
        f.add(b);
        b = new Button("Resize Dialog");
        b.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (d != null)
                {
                    d.setLocation(250,250);
                    d.setSize    (600,400);
                }
            }
        });
        f.add(b);

        // Show the frame
        f.pack();
        f.setVisible(true);
        }
}


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to