I\'m trying to make my code more readable, so I decided to use some short IF statements.
Here\'s my code which doesn\'t work (\"not a statement\"):
I'm a little late to the party but for future readers.
From what i can tell, you're just wanting to toggle the visibility state right? Why not just use the ! operator?
!
jxPanel6.setVisible(!jxPanel6.isVisible);
It's not an if statement but I prefer this method for code related to your example.