Create a Popup Menu in Java

Popup Menu is the class which is used to construct the pop up menu and is helpful to add MenuItem . Popup Menu is the list of menu which is displayed on the frame or Applet window.Popup Menu works when we press the right click of the mouse button.

Passing parameters to Applet in Java

An <applet> tag is used to pass parameter in an applet. We use <PARAM> tag to pass anapplet parameters. The <PARAM> tag has two attributes one is NAME and other is VALUE.

BorderLayout in Applet

BorderLayout divides the container into five parts (directions),east,west,north,south,centre. By using this Layout we can place AWT components in each parts(different location).

GridLayout in Applet

GridLayout places components(Labels,TextFields etc) in a grid of equally sized cells(intersection of a row and a column), adding them to the grid from left to right and top to bottom.It divides the containers into rows and columns.

program for applet life cycle in java

An applet is a window based event driven program and its wait until an event occurs.
Every Java applet inherits a set of default behaviours from the Applet class. Whe an applet is loaded, it undergoes a series of changes in its state .

States are.....

Born State--init()
Running State--start()
Idle State---stop()
Dead State---destroy()

More Articles...

Page 7 of 8