Code example for JLabel

Methods: setVisiblesetText

0
 
        caretUpdate(null); 
    } 
 
    public void setInfo(String txt) {
        infoLabel.setText(txt);
        infoLabel.setVisible(txt != null);
    } 
 
    public void setStatusComponent(JComponent statusComponent) {
        statusPanel.removeAll();
        statusPanel.add(statusComponent, BorderLayout.CENTER);
        statusPanel.revalidate();
    } 
 
    /** 
     * Target for caret-status 
     * 
     * @author Ole.Matzura 
     */ 
Connect your IDE to all the code out there  Get Codota for Java