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

fp.bugs 2242: Solaris only: cannot nest GridLayout objects

XMLWordPrintable

    • 1.0beta2
    • sparc
    • solaris_2.3
    • Verified

      Garth Allen Dickie <###@###.###>

      Solaris appletviewer only: Cannot nest a GridLayout panel inside a GridLayout panel,
      This works fine in a standalone java app.
      Works fine in Win 32.

      Steps to reproduce:
      Compile accompanying source code
      Run appletviewer with ControlTest.html

      /* fp.bugs 2242 */

      import java.awt.*;
      import java.applet.Applet;

      class SubPanel extends Panel
      {
          public SubPanel(String name)
          {
             setLayout(new GridLayout(1, 1));
             add("North", new Button( name));
          }

      }


      class SuperPanel extends Panel
      {
          public SuperPanel( )
          {
             setLayout( new GridLayout(1, 2));
             add("East", new SubPanel("Wombats 1"));
             add("West", new SubPanel("Wombats 2"));
          }
      }


      public class ControlTest extends Applet
      {
          public void init()
          {
             add(new SuperPanel() );
          }

          public static void main(String args[])
          {
             ControlTest c = new ControlTest();
             c.init();
             c.start();
             
             Frame f = new AppFrame("Nested Grid Test");
             f.add("Center", c);
             f.resize(200, 200);
             f.show();
          }

      }

      class AppFrame extends Frame
      {
          public AppFrame(String name)
          {
             super(name);
          }

          public boolean handleEvent(Event e)
          {
             if (e.id == Event.WINDOW_DESTROY)
             {
                System.exit(0);
                return true;
             }
             return super.handleEvent(e);
          }
      }


      /* html file */
      <title> test fp.bugs 2242 </title>
      <!-- Changed by: Kevin A. Smith, 7-Nov-1995 -->
      <applet code = "ControlTest.class" width = 200 height = 200 >
      </applet>


            sshaiosunw Sami Shaio (Inactive)
            kasmithsunw Kevin Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: