Package java.awt

Examples of java.awt.Container.validate()


            if (p != null) {
              if (p instanceof JComponent) {
                ((JComponent) p).revalidate();
              } else {
                parent.invalidate();
                p.validate();
              }
            }
          }
        });
      }
View Full Code Here


    /** Repaint this component. */
    public void alloyRepaint() {
        Container c=getParent();
        while(c!=null) { if (c instanceof JViewport) break; else c=c.getParent(); }
        setSize((int)(graph.getTotalWidth()*scale), (int)(graph.getTotalHeight()*scale));
        if (c!=null) { c.invalidate(); c.repaint(); c.validate(); } else { invalidate(); repaint(); validate(); }
    }

    /** Construct a GraphViewer that displays the given graph. */
    public GraphViewer(final Graph graph) {
        OurUtil.make(this, BLACK, WHITE, new EmptyBorder(0,0,0,0));
View Full Code Here

    Container parent = panel.getParent();
    if(parent != null) {
      panel.isRemovingFromParent = true;
      parent.remove(panel);
      parent.invalidate();
      parent.validate();
      parent.repaint();
    }
  }

  @Override
View Full Code Here

        isRemovingFromParent = true;
        Container parent = getParent();
        if(parent != null) {
          parent.remove(this);
          parent.invalidate();
          parent.validate();
        }
        isRemovingFromParent = false;
      } else {
        super.removeNotify();
      }
View Full Code Here

    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        Container contentPane = getContentPane();
        contentPane.removeAll();
        contentPane.invalidate();
        contentPane.validate();
      }
    });
    // For this applet, I decided to close the interface here.
    NativeInterface.close();
  }
View Full Code Here

    Container parent = panel.getParent();
    if(parent != null) {
      panel.isRemovingFromParent = true;
      parent.remove(panel);
      parent.invalidate();
      parent.validate();
      parent.repaint();
    }
  }

}
View Full Code Here

        Container parent = getParent();
        if(parent != null) {
          isRemovingFromParent = true;
          parent.remove(this);
          parent.invalidate();
          parent.validate();
          isRemovingFromParent = false;
        }
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.