Our Blog

Writing a Simple Bean in Java Technology
Writing a Simple Bean in Java Technology

Steps: 1. Write bean code and put it in a file in your own directory. Example: import java.io.Serializable; import java.awt.*; public class testbean exends Canvas implements Serializable { public testbean() { setSize(60,60); setBackground(Color.blue); } } 3. Compile javac testbean.java 4. Create manifest file – Edit test.mft Name: testbean.class Java-Bean: True 5. Create JAR file jar cfm testbean.jar test.mft testbean.class 6.…

INTROSPECTION in JAVA BEANS
INTROSPECTION in JAVA BEANS

Process of analyzing bean to determine its capabilities using Application Builder tool. Without introspection bean could not operated. We can provide introspection by 2 ways : 1. by following naming convention for setting properties , methods and events. 2. additional class provided that supplies info externally.

Install JDK for BDK to Work
Install JDK for BDK to Work

Starting BDK : 1. change directory to c:\bdk\beanbox 2. run batfile (Run.bat) set Autoexec.bat set classpath=c:\bdk1.2\lib; JAR FILES : – All beans are packaged in JAR file – JAR files allows you to efficiently deploy set of classes and their associated resources. – JAR contain text,audio,image and multimedia files – JAR technology makes it easy to deliver and install software…

Application Builder Tool in Java Beans
Application Builder Tool in Java Beans

Palleter or Tool box available that list all beans. We can add new bean components to this tool box. Worksheet allows designer to layout beans in GUI. A designed may drag or drop a bean from tool box to this worksheet Commands allow designed to enquire about state and behavior of beans.

Advantages of Bean
Advantages of Bean

Bean obtain write once run anywhere strategy Properties, methods and events exposed to application builder tool can be controlled Configuration setting of bean can be saved in persistent storage and restored at a later time A bean may register to receive events from other objects and can generate events that are sent to other objects

Making Applet with Beans
Making Applet with Beans

File -> Make Applet -> jar file : C:\bdk\tmp\Myapplet.jar Make file: Myapplet Files created : 1. Jar file that contains all classes 2. HTML file 3. Readme file 4. A subdirectory To run applet C:\bdk\tmp> appletviewer Myapplet.html

Persistence in Java Beans
Persistence in Java Beans

Persistence : Enables a bean to save and restore its state . Once you change bean propertie, you can save the state of bean and can restore that bean later. Menus : SAVE SERIALIZE COMPONENTS MAKE APPLET LOAD LOAD JAR PRINT CLEAR EXIT CUT COPY PASTE REPORT EVENTS BIND PROPERTY : Lists all selected bean bound properties, methods.

Java Beans
Java Beans

A Bean is a reusable java component. Beans is a software component that is designed to be reusable in different environments and architectures. Beans allows us to build complex systems from software components Java ABT allows to combine components into applets, applications or composite components Allows to write component software in java lang. Bean can check spelling of document or forecast…

HTML Applet Tag in Java Technology
HTML Applet Tag in Java Technology

<APPLET [CODEBASE = codebase URL] CODE = appletfile [ALT = alternate text] [NAME = appletInstanceName] WIDTH = pixels HEIGHT = pixels [ALIGN = alignment] > [ <PARAM NAME = attribute name VALUE = attribute value>] </APPLET>

Applet skeleton in Java Technology
Applet skeleton in Java Technology

Applet skeleton : init() start() paint() stop() destroy() init() : first called – initialise variables here – called only once start(): called after init() – can be restarted. paint(): called each time applet is redrawn – also called when applet begin execution stop() : called when web browser leavs the HTML document you can call stop() suspend applet and restart…