Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4075986

Order of code execution causes dialog to fill screen on Solaris

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      sparc
    • OS:
      solaris_2.5.1

      Backports

        Description



        Name: rlT66838 Date: 09/02/97


        The following class shows the bug

        import java.awt.*;
        public class DialogBug extends Dialog{
            public static void main(String[] args)
            {
                Frame f = new Frame("Parent Frame");
                f.show();
                new DialogBug(f, null, null);
            }

            public DialogBug(Frame parent,String title,String prompt){
        super(parent, "Dialog Bug", true); //Makes the dialog Modal

        if(title ==null)
        setTitle("Default Dialog Title");
        if(prompt == null)
        prompt = "You forgot to pass a prompt";

        setLayout(null);
        addNotify();
        setResizable(false); //Does not work on Solaris

        Dimension dialogSize = new Dimension(getInsets().left+
                           getInsets().right+230,
                           getInsets().top+getInsets().bottom+150);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();

        setSize(dialogSize);
        setLocation((screenSize.width/2) - (dialogSize.width/2),
        (screenSize.height/2)- (dialogSize.height/2));
        //More dialog code goes here but not needed to show bug.
        show();
            }
        }

        When the code is written like this and then executed on Solaris, the dialogs take up the whole screen.

        Please note that the class files are generated via Symantec Cafe 1.8 on Win 95 and then the class files are ftp'd over
        to the Solaris SPARC station

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                bklocksunw Brian Klock (Inactive)
                Reporter:
                rlewis Roger Lewis (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: