/** * Ensures that this component has a valid layout. This method is * primarily intended to operate on instances of <code>Container</code>. */ public void validate() {} /** * Invalidates this component. This component and all parents * above it are ed as needing to be laid out. This method can * be called often, so it needs to execute quickly. */ public void invalidate() {}
validate()将容器中的所有组件重新布局。
revalidate()将组建标志为无效,并将组建层次结构中的第一个容器(一般是panel)在事件派发线程上执行validate().
详细区别请察看有关资料。
* Ensures that this component has a valid layout. This method is
* primarily intended to operate on instances of <code>Container</code>.
*/
public void validate() {} /**
* Invalidates this component. This component and all parents
* above it are ed as needing to be laid out. This method can
* be called often, so it needs to execute quickly.
*/
public void invalidate() {}