Package java.awt

Examples of java.awt.Container.invalidate()


  //this method fixes dumb repaint issues
  //when components are updated
  private void forceRepaint()
  {
    final Container contentPane = getContentPane();
    contentPane.invalidate();
    contentPane.validate();
    contentPane.repaint();
  }

  public void valueChanged(TreeSelectionEvent event)
View Full Code Here


            oldParent.remove(component);
            if (oldParent instanceof JComponent) {
                ((JComponent) oldParent).revalidate();
            } else {
                // not sure... never have non-j comps
                oldParent.invalidate();
                oldParent.validate();
            }
        }
    }
View Full Code Here

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

                      .getParent();
                  if (container != null) {
                    container.doLayout();
                    container.setSize(editingContainer
                        .getPreferredSize());
                    container.invalidate();
                  }
                }
              });
            }
View Full Code Here

        floatFrame.setSize(dims.width + insets.left + insets.right,
                           dims.height + insets.top + insets.bottom);
        floatFrame.show();
      }

    newParent.invalidate();
    newParent.validate();
    newParent.repaint();
  }

  /**
 
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

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

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

    // For this applet, I decided to remove all content.
    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

    embeddedPanel = null;
    Container parent = panel.getParent();
    if(parent != null) {
      panel.isRemovingFromParent = true;
      parent.remove(panel);
      parent.invalidate();
      parent.validate();
      parent.repaint();
    }
  }
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.