//file: TextLabel.java package magicbeans; import javax.swing.JLabel; public class TextLabel extends JLabel { public void setText( String s ) { super.setText(s); if ( getParent( ) != null ) { invalidate( ); getParent().validate( ); } } }