Does anyone know the reason why these Java swing methods are deprecated :
Component.show();
Component.hide();
@Component is an annotation that allows Spring to automatically detect our custom beans. In other words, without having to write any explicit code, Spring will: Scan our application for classes annotated with @Component. Instantiate them and inject any specified dependencies into them.
4) AWT is used for GUI programming in java? It is lightweight. It supports pluggable look and feel. It follows MVC (Model View Controller) architecture.
JDK 1.1 introduced Java Beans. Java Beans rely in reflection and introspection to determine what the properties of a Bean are (a Bean is a "component"). Properties are then displayed in a Property Sheet.
By default beans use the following foormat:
boolean isXXX()
<type> getXXX()
void setXXX(<type>)
(going from memory on these next two... they are for indexed properties)
<type> getXXX(int)
void setXXX(<type>, int)
You can override the defaults, but rather than do that most things just rely on the naming pattern.
So show/hide didn't conform to the naming pattern and were replaced with setVisible(boolean) which did.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With