Professional Documents
Culture Documents
hitesh.parmar915@gmail.com
@i_hiteshparmar
What is a Java Bean.
Components and classes with respect to Java Bean.
Java.Beans(Package).
The Component and its type in Java Beans.
Useful Terms while Using Java Beans.
Software Components
Visually Manipulated, Builder Tools
Support
“It’s a Component Architecture of Java which allow
you to define the Component ”
Example:-
Swing are all the Java Bean component
Component (Button,TextField,Label)
Java Bean classes follow certain Rule or Condition.
All java Bean classes must Implement the Serializable
Interface.
Component may be used by some apllication
builder.
Class Object
Serializing
Component
Object
CLASS
GUI based
Component
Boolean Properties
Indexed Properties
1 Simple Properties:-
Represent a single value.
The accessor methods should follow standard naming
conventions.
public <PropertyType> get<PropertyName>();
public void set<PropertyName>(<PropertyType> value);
Example:
Example:
Example:
public Color setPalette(int index);
public void setPalette(int index,Color value);
public Color[] getPalette();
public void setPalette(Color[] values);
Bound:-
a bound property notifies other objects when its value
changes
generates a PropertyChange event with property name,
old value and new value
Constrained:-
an object with constrained properties allows other
objects to veto a constrained property value change
Constrained property listeners can veto a change by
throwing a PropertyVetoException
Two types of objects are involved:
“Source” objects.
“Listener” objects.