I am using the NetBeans Platform and Java to develop an Application. At the bottom of the application there is a StatusDisplayer, that is always included by default. To this StatusDisplayer I have added a panel (StatusBarJPanel). This StatusBarJPanel has two image icons, indicating network activity.
I don't know how to hide (setVisible(false)) these icons on this panel created at runtime when there is no activity...how to update the two icons on the StatusBarJPanel.
The following is the code that adds my StatusBarJPanel to the StatusDisplayer:
import java.awt.Component;
import gui.StatusBarJPanel;
import org.openide.awt.StatusLineElementProvider;
import org.openide.util.lookup.ServiceProvider;
@ServiceProvider(service = StatusLineElementProvider.class)
public class StatusBar implements StatusLineElementProvider {
private StatusBarJPanel statusBarBottomJPanel = new StatusBarJPanel();
@Override
public Component getStatusLineElement() {
return statusBarBottomJPanel;
}
}