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

java.awt.Window.pack() sets zero window size under KDE

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      ladybird
    • CPU:
      x86
    • OS:
      linux
    • Verification:
      Verified

      Backports

        Description



        Name: skR10017 Date: 10/16/2000



        JCK 1.3 api/java_awt/Event/FrmEventTests.html and the following test
        fail due to the same reason.
        After executing pack() method size of the frame became zero.

        Please, note that failure is reproduced only with KDE Window Manager.

        ------------------------------------test.java-----------------------------
        import java.awt.*;

        public class test extends Frame {

            public static void main( String[] argv ) {

                test t=new test();
                t.setSize(200, 200);
                System.out.println("Width before pack:"+t.getSize().width+
                                   " Height before pack:"+t.getSize().height);
                t.pack();
                System.out.println("Width after pack:"+t.getSize().width+
                                   " Height after pack:"+t.getSize().height);
                if(t.getSize().width==0 && t.getSize().height==0)
                    System.out.println("Failed.");
                else
                    System.out.println("Passed.");
            }
        }
        --------------------------------------------------------------------------

        With KDE :

        [kotl@linux-14 /tmp]$ /net/linux-15/export/home/jdk1.3/linux/bin/java -version
        java version "1.3.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
        Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
        [kotl@linux-14 /tmp]$ /net/linux-15/export/home/jdk1.3/linux/bin/java test
        Width before pack:200 Height before pack:200
        Width after pack:0 Height after pack:0
        Failed.
        [kotl@linux-14 /tmp]$

        ------------------------------------------------------
        With GNOME :
        [kotl@linux-14 /tmp]$ /net/linux-15/export/home/jdk1.3/linux/bin/java test
        Width before pack:200 Height before pack:200
        Width after pack:2 Height after pack:17
        Passed.
        [kotl@linux-14 /tmp]$

        ---------------------------------------------------------
        Under Solaris JDK1.3 and CDE:

        bash-2.00$ /export/ld25/java/dest/jdk1.3/solaris/bin/java -version
        java version "1.3.0rc3"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc3-Z)
        Java HotSpot(TM) Client VM (build 1.3.0rc3-Z, interpreted mode)
        bash-2.00$ /export/ld25/java/dest/jdk1.3/solaris/bin/java test
        Width before pack:200 Height before pack:200
        Width after pack:12 Height after pack:34
        Passed.
        bash-2.00$


        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mbronsonsunw Mike Bronson (Inactive)
                Reporter:
                kotlsunw Kotl Kotl (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: