O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Component Visibility and Responsiveness

All components, other than frames, windows, and dialogs,[3] are visible by default. You can use the The setVisible method from java.awt.Component may be used to set the visibility of individual components. If you need to toggle the visibility of a set of components, you should consider using the CardLayout layout manager—see “The CardLayout Layout Manager”—instead of individually managing the visibility of each component.

[3] Invoking setVisible(true) on frames, windows, and dialogs makes them visible.

You can also toggle a component's responsiveness to user input by invoking the setEnabled method, passing either true or false to enable or disable, respectively, a component's responsiveness to user input. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required