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

Method MetalRootPaneUI.installUI does not install LayoutManager

    Details

    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description



      Name: nkR10003 Date: 04/06/2001


      JavaDoc comments for method MetalRootPaneUI.installUI state:
      "Invokes supers implementation of installUI to install the necessary state
      onto the passed in JRootPane to render the metal look and feel implementation
      of RootPaneUI. This will also install a new LayoutManager on the JRootPane.
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      If the windowDecorationStyle property of the JRootPane is other than
      JRootPane.NONE, this will add a custom Component to render the widgets to
      JRootPane, as well as installing a custom Border on the JRootPane."

      Actually installUI method does not install LayoutManager.

      Example below demonstrates this problem:
      ------------------example--------------------
      import javax.swing.JRootPane;
      import javax.swing.plaf.metal.MetalRootPaneUI;

      public class test {
          public static void main(String[] args) {
              JRootPane pane = new JRootPane();
              pane.getUI().uninstallUI(pane);
              pane.setLayout(null);
              MetalRootPaneUI ui = new MetalRootPaneUI();
              ui.installUI(pane);
              if (pane.getLayout() == null) {
                  System.out.println("LayoutManager: " + pane.getLayout());
                  System.out.println("Test failed");
              } else {
                  System.out.println("Test passed");
              }
          }
      }
      ------------------output---------------------
      LayoutManager: null
      Test failed
      ---------------------------------------------

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

        Attachments

          Activity

            People

            • Assignee:
              svioletsunw Scott Violet (Inactive)
              Reporter:
              knasunw Kna Kna (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: