How to Make a Swing Component Appear and Disappear

Here’s a very short bit of code that will make a StatusBar hide or show, accordingly:

 public void viewStatusBar() {	/* Hide or show the statusbar */	StatusBarPane().setVisible(!(StatusBarPane().isVisible()));}

Just have a button actionlistener call this function.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: