question: private void hideableLabel ( JLabel label , String text ) { if ( text . isEmpty ( ) ) { label . setForeground ( LABEL_INVISIBLE ) ; } else { label . setForeground ( LABEL_VISIBLE ) ; label . setText ( text ) ; } }
target:  Changes the text on the given label, making it invisible if the text is empty or visible again otherwise.