Here you can find the source of isComponentShowing(final JComponent component)
Parameter | Description |
---|---|
component | a parameter |
public static boolean isComponentShowing(final JComponent component)
//package com.java2s; // it under the terms of the GNU General Public License as published by import javax.swing.*; public class Main { /*********************************************************************************************** * A convenience method to centralise all isShowing() calls. *//from w w w .ja v a 2s . c om * @param component * * @return boolean */ public static boolean isComponentShowing(final JComponent component) { // The API semantics for "shown" are different from for "visible". // Component.isShowing() means the component is truly visible, // whereas Component.isVisible() does not. // See: http://forums.sun.com/thread.jspa?messageID=848376 if (component != null) { //System.out.println("UIComponent SHOWING=" + component.isShowing()); return (component.isShowing()); } else { //System.out.println("UIComponent SHOWING=false"); return (false); } } }