What are the different types of Layouts ?
The different types of Layouts are :
What is the difference between list and choice ?
A Choice is a compact form that requires you to
pull it down to see the list of available
choices. Only one item may be selected from a
A List may be displayed in such away that several
List items are visible. A List supports the
selection of one or more List items.
What is the default layout of the panel and frame ?
The default layout of panel is flowlayout.
The default layout of frame is border layout.Reply
What is the difference between panel and frame ?
A Panal and the Frame, both are the component of
the Abstract Window Toolkit(AWT). A panel is a
component which can be embedded in a frame, and a
frame is nothing but a window application an can
embed all the components. Frame-is a top level
while the panel is sub-level container..not the top level
What are the types of methods in mouse listeners ?
* public void mouseClicked(MouseEvent e)
* public void mouseReleased(MouseEvent e))
* public void mouseOver(MouseEvent e)
* public void mouseDoubleClicked(MouseEvent e)
* public void mousepressed(MouseEvent e)Reply
What are the types of mouse event listeners ?
What are all the listeners in java and explain ?
An event listener is an object used to handling a
particular kind of event.
Event Handling Interfaces
What is mean by event handling ?
Events represent the activity that occurs between
the user and the application. Java�s Abstract
Windowing Toolkit (AWT) communicates these
actions to the programs using events. When the
user interacts with a program, by clicking a
command button, the system creates an event
representing the action and delegates it to the
event-handling code within the program. This code
determines how to handle the event so the user
gets the appropriate response. Java provides the
Event class and each event is represented by an
object that gives information about the event and
identifies the event source. Whenever an event
occured by an event sourse, An appropriate evetnt
handler(EventListener) is called. The Event
Listener knows that how to handle the handle.
How to communicate between applet and an applet ?
Sometimes you need to allow two or more applets to
communicate on the Web page. Because the applets
all run within the same Java context-that is, they
are all in the same virtual machine together-applets
can invoke each other's methods.The AppletContext
class has some methods for locating another applet
by name, or retrieving all the applets in the current
runtime environment. The AppletContext class in the
java.applet package contains the two member functions
getApplet and getApplets. By using these functions, an
applet can find other applets and invoke methods on them.
<applet code="App1" width="400" height="100" name="applet1">
<applet code="App2" width="400" height="100" name="applet2">
Using the name attribute, you can refer to a applet:
Applet anotherApplet = getApplet("applet1");
anotherApplet.someMethod(); //calling any public method
What is the difference between getAppletInfo and getParameterInfo ?
The getAppletInfo() method returns the string that
describes the applet. The getParameterInfo() method
returns an array of string arrays that specify the
name,type, and description of each of the parameter.