首先想到的是看java api了
isShowing
public boolean isShowing()
Determines whether this component is showing on screen. This means that the component must be visible, and it must be in a container that is visible and showing. isVisible
public boolean isVisible()
Determines whether this component should be visible when its parent is visible. Components are initially visible, with the exception of top level components such as Frame objects.

解决方案 »

  1.   

    isShowing
    public boolean isShowing()
    Determines whether this component is showing on screen. This means that the component must be visible, and it must be in a container that is visible and showing. isVisible
    public boolean isVisible()
    Determines whether this component should be visible when its parent is visible. Components are initially visible, with the exception of top level components such as Frame objects.
    两个方法下面的英语是什么意思呢?
    我看我是完了
    什么都不懂啊!!!救命啊
      

  2.   

    isVisible():
    如果组件当前完全可见,那么返回为trueisShowing():
    如果组件的visible属性为true,(比如我们setVisible(true);),那么不管组件看不看的到
    (当前),都返回true也就是说,只要组件(或者它的父类)的visible属性是true,那么它的isShowing()肯定是true,
    但它的isVisible()只有它能被看到才是true,如果它被其他组件遮挡了(比如一个下拉菜单),
    那么它的isVisible()就是false,尽管它的isShowing()是true