コード例 #1
0
ファイル: JApplet.java プロジェクト: Cultivators/JDKResource
 /** Called by the constructor methods to create the default rootPane. */
 protected JRootPane createRootPane() {
   JRootPane rp = new JRootPane();
   // NOTE: this uses setOpaque vs LookAndFeel.installProperty as there
   // is NO reason for the RootPane not to be opaque. For painting to
   // work the contentPane must be opaque, therefor the RootPane can
   // also be opaque.
   rp.setOpaque(true);
   return rp;
 }
コード例 #2
0
    Component createComponent(Component owner) {
      Panel component = new MediumWeightComponent();

      rootPane = new JRootPane();
      // NOTE: this uses setOpaque vs LookAndFeel.installProperty as
      // there is NO reason for the RootPane not to be opaque. For
      // painting to work the contentPane must be opaque, therefor the
      // RootPane can also be opaque.
      rootPane.setOpaque(true);
      component.add(rootPane, BorderLayout.CENTER);
      return component;
    }
コード例 #3
0
 // Override createRootPane() to automatically resize
 // the frame when contents change
 protected JRootPane createRootPane() {
   JRootPane rootPane = new JRootPane(); // {
   //		    private boolean packing = false;
   //
   //		    public void validate() {
   //			super.validate();
   //			if (!packing) {
   //			    packing = true;
   //			    pack();
   //			    packing = false;
   //			}
   //		    }
   //		};
   rootPane.setOpaque(true);
   return rootPane;
 }
コード例 #4
0
 /*
  * (non-Javadoc)
  *
  * @see javax.swing.JFrame#createRootPane()
  */
 @Override
 protected JRootPane createRootPane() {
   JRootPane rp = new JRibbonRootPane();
   rp.setOpaque(true);
   return rp;
 }