I need to know the line of code required to check to see if a button is visible at the time. I want the program to check if the button is visible, and if it is visible, hide it. If it's not visible, show it.
Printable View
I need to know the line of code required to check to see if a button is visible at the time. I want the program to check if the button is visible, and if it is visible, hide it. If it's not visible, show it.
try something like this
if(button.isVisible()){button.setVisible(False)}
else{button.setVisible(true)}
the isVisible is inherited from Component and setVisible is inherited from JComponent.
not sure if this will work though as I'm just learning too, but maybe will help