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

Swing and AWT remote ( via X ) display problems

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 1.2.0
    • 1.2.0, 1.3.0
    • client-libs
    • 2d
    • 1.2fcs
    • generic, sparc
    • solaris_2.6, solaris_7
    • Not verified

    Description



      Name: rm29839 Date: 02/27/98


      Hi,


      When attempting to execute an application ( which incidentally is
      an applet ) remotely via X windows yields differing results
      when executed by a 1.1.4 virtual machine as opposed to a 1.2beta2.

      Local execution, i.e the display host is the also host where the
      code is running presented no problems for either JDK version. This
      was NOT the case for remote execution, i.e. when the display host
      is different to the host where the code is executing.

      Essentially, when run under 1.1.4 presentation is as expected; the
      component is rendered properly and the window is properly formed.
      In contrast execution under 1.2beta2 results in incomplete
      component rendering and window ( frame ) formation. The resultant
      "application" varies according to method of remote access, e.g.
      telnet, ssh etc., desktop environment and container ( AWT or Swing )
      type used. In summary, the problems appear to affect Swing containers
      more than AWT containers. The difficulties are most pronounced under
      "secure shell" ( ssh ) and when the display host is a DEC, however
      SUNs are not immune to these problems. In a full-scale interface, this
      anomaly is usually manifest by incomplete display ( usually missing
      Swing components ) of the interface.

      The results in detail are presented below in the form of two (2)
      scenarios. Scenario 2 has no local execution tests as this required
      a Digital Unix version of the JDK and was deemed inappropriate for
      this bug report. Only anomalous behaviour is explicitly stated.
      Behaviour that is normal is NOT commented on. Swing 0.7 was used in
      both scenarios where Swing components were used.

      The code has not been run as an applet.

      A possibly related bug report regarding this error is 4098506.


      Regards,

      Mark A.



      Scenario 1
      ----------

      Display Host : SUN Sparc Ultra 2
      Code Executing Host : SUN Sparc Ultra 1
      X Windows Version : X11R6.3
      Desktop : Common Desktop Environment ( CDE )
      Secure Shell Version : 1.2.17
      AWT Containers : Frame and Applet
      Swing Containers : JFrame and JApplet

       -----------------------------------------------------------------
      | JDK | Container | Local | Remote Display |
      | | Type | Display | ----------------------------------|
      | | | | ssh | rlogin, rsh and telnet |
      |-----------------------------------------------------------------|
      | 1.1.4 | AWT | OK | OK | OK |
      |-----------------------------------------------------------------|
      | 1.1.4 | Swing | OK | OK | OK |
      |-----------------------------------------------------------------|
      | 1.2B2 | AWT | OK | OK | OK |
      |-----------------------------------------------------------------|
      | 1.2B2 | Swing | OK | Slider | OK |
      | | | | has no | |
      | | | | knob | |
       -----------------------------------------------------------------


      Scenario 2
      ----------

      Display Host : DEC Alpha 3500
      Code Executing Host : SUN Sparc Ultra 2
      X Windows Version : X11R6
      Desktop : FVWM95-2
      Secure Shell Version : 1.2.20
      AWT Containers : Frame and Applet
      Swing Containers : JFrame and JApplet

       -----------------------------------------------------------------
      | JDK | Container | Local | Remote Display |
      | | Type | Display | ----------------------------------|
      | | | | ssh | rlogin, rsh and telnet |
      |-----------------------------------------------------------------|
      | 1.1.4 | AWT | N/A | OK | OK |
      |-----------------------------------------------------------------|
      | 1.1.4 | Swing | N/A | OK | OK |
      |-----------------------------------------------------------------|
      | 1.2B2 | AWT | N/A | Frame appears but no minimise, |
      | | | | maximise and kill icons/buttons |
      | | | | appear in the top right hand |
      | | | | corner. Frame's X menu in the top |
      | | | | left hand corner appears disabled |
      | | | | but all options are enabled. |
      | | | | Cannot resize window using cursor |
      | | | | and left hand mouse button. |
      |-----------------------------------------------------------------|
      | 1.2B2 | Swing | N/A | Slider | Slider's colour is |
      | | | | has no | orange rather than the |
      | | | | knob. | motif default ( a |
      | | | | | purplish grey ). |
      | | | |-----------------------------------|
      | | | | Frame appearance and behaviour as |
      | | | | per the results for 1.2B2 AWT. |
       -----------------------------------------------------------------



      1. To reproduce the problem:

             a) Set the 'JDK_HOME' variable to point to the home
                 of JDK1.1.4
             b) Compile the following code, as listed in point 2.
             c) Login using 'telnet' to the host where the code is
                 to be executed.
             d) Execute the application using the same version of
                 the JDK that was used to compile it.
             e) Repeat steps c) and d) for 'rsh', 'rlogin' and 'ssh'.
                 Remember to set the 'DISPLAY' variable on the code
                 executing host to the host where the "application" is
                 to be displayed for 'rsh' and 'rlogin'.
             f) Repeat all of the above steps, setting 'JDK_HOME'
                 to the home of JDK1.2beta2.

      The CLASSPATH in ALL tests was set to include 'classes.zip',
      'swing.jar', 'motif.jar' and the current directory.


      2. Source code demonstrating problem:

      import com.sun.java.swing.JApplet;
      import com.sun.java.swing.JFrame;
      import com.sun.java.swing.JPanel;
      import com.sun.java.swing.JSlider;

      import java.applet.Applet;
      import java.awt.Frame;


      // public class RemoteGUITest extends Applet
      public class RemoteGUITest extends JApplet
      {
         public RemoteGUITest ()
         {
         }

         public void init ()
         {
            JSlider Sldr = new JSlider (JSlider.HORIZONTAL, 1, 20, 10);
            // add ("Center",Sldr);
            getContentPane ().add ("Center",Sldr);
         }

         public static void main (String [] Args)
         {
            // Frame ApplnWindow = new Frame ();
            // RemoteGUITest Applt = new RemoteGUITest ();

            JFrame ApplnWindow = new JFrame ();
            RemoteGUITest Applt = new RemoteGUITest ();


            /* Applet */
            /* This works with java.applet.Applet but NOT */
            /* com.sun.java.swing.JApplet! The applet's */
            /* 'getContentPane ()' generates a Null Pointer */
            /* Exception. */
            /*
            Applt.init ();

            // ApplnWindow.add ("Center", Applt);
            ApplnWindow.getContentPane ().add ("Center", Applt);
            // ApplnWindow.pack();
            ApplnWindow.setSize(250, 50);
            ApplnWindow.setVisible (true);
            */

            /* JApplet */
            /* By the way of explanation the following magic is */
            /* my workaround to a bug preventing the execution */
            /* of a JApplet as an application. A bug report */
            /* ( 4106368 ) was submitted but the bug was found */
            /* to be unreproducible. I require it to demonstrate */
            /* these errors, and it doesn't affect normal applet */
            /* as an application execution. Otherwise it should */
            /* be ignored. */
            // ApplnWindow.add ("Center", Applt);
            ApplnWindow.getContentPane ().add ("Center", Applt);
            // ApplnWindow.pack ();
            ApplnWindow.setSize (250, 50);
            ApplnWindow.setVisible (true);
            ApplnWindow.setVisible (false);
            Applt.init ();
            ApplnWindow.setVisible (true);
         }
      }


      3. Error message generated:

      None.


      4. Trace information is generated by the program:

      None.


      5. Relevant configuration information:

      Configuration information is available in the scenarios
      presented above.
      (Review ID: 25742)
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              tnguyensunw Thanh Nguyen (Inactive)
              rmandelsunw Ronan Mandel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: