JButton, JTextField getVisible property required

I want to show/hide some controls.

The idea is:

myButton.setVisible(!myButton.getVisible());

So I simply revert a state that I expect to know.

But a getVisible method doesn't exist.

A isShowing() metod does exist, but it's rather different.

What is the java/swing approach to this problem? Hope not save a state in a boolean field...

[383 byte] By [agostino75a] at [2007-11-27 3:49:27]
# 1
a lot of methods that return a boolean value start with is...()myButton.setVisible(!myButton.isVisible());
Michael_Dunna at 2007-7-12 8:53:20 > top of Java-index,Desktop,Core GUI APIs...