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

Installing or running J2SDK1.4.0 causes problems running with J2SDK 1.3.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.4.0
    • client-libs
    • x86
    • linux



      Name: yyT116575 Date: 08/16/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)


      I have just installed version 1.4.0-beta of the J2SDK in order to see
      whether any of the problems I had with previous versions had been fixed,
      and whether there were any serious regressions. Either after installing
      it, or running it I am not sure which I now have serious problems when
      trying to run an existing application using version 1.3.0 of the J2SDK.

      These problems include.
      1 Windows coming up in the wrong place, or coming up in the
         right place and moving to the wrong place.

      2 Window contents either not being displayed at all, or only
         a small part at the very center. The visual effect is of a
         border being painted over the top of the window.

      I have tried using an IBM JDK to see whether there was some conflicts
      between the two sun versions but that also failed in a similar way.

      I have seen similar problems to this on other peoples' machines who
      are using version 2 of the KDE window manager so it could be some
      sort of conflict with the window manager.

      There is a bug open on KDE for a similar problem so it appears to
      be a combined java and KDE problem. The url is
      http://bugs.kde.org/db/30/30058.html

      Compile and run as follows.
              javac Dialog14.java
              CLASSPATH=. java Dialog14

      What it does is popup a dialog which represents a login screen
      and when you close that it displays a frame which represents the
      application.

       1) Run it using 1.3.0 and the dialog pops up in the middle of
          the screen and then the frame appears at 100, 100.

       2) Run it using 1.4.0 and it works just the same.

       3) Now when I run it using 1.3.0 the dialog appears in the
          middle for a split second but then it is moved into the
          bottom right corner. When it is closed the frame appears
          briefly at 100, 100 but then it is moved into the top left
          hand corner. The contents of the frame are not redrawn
          but when you resize the frame almost to the size of screen
          you can see that something is being redrawn in the bottom
          left corner of the frame.

       4) If I know log off KDE and then log back in again it all
          works properly until I run the application using 1.4.0.

      import java.awt.*;

      import javax.swing.*;

      class Dialog14 extends JDialog {

        public Dialog14 (JFrame frame) {
          super (frame, "Dialog test", true);

          Container contentPane = getContentPane ();
          contentPane.add (new JLabel ("Test"));

          pack ();

          setLocationRelativeTo (frame);
        }

        static class Frame14 extends JFrame {

          public void display () {
            Container contentPane = getContentPane ();
            contentPane.add (new JLabel ("Test"));
            
            pack ();

            setLocation (100, 100);
            setVisible (true);
          }
        }

        public static void main (String [] args) {
          Frame14 frame = new Frame14 ();
          JDialog dialog = new Dialog14 (frame);
          dialog.show ();
          
          frame.display ();
        }
      }
      (Review ID: 130060)
      ======================================================================

            uwesunw Uwe Uwe (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: