hi all! here are some queries. pl try to solve these!
thanx.
ashok.
________________
[1]why does the following code not exit when run? for coming out, u need to press Ctrl C.
import java.awt.*;
public class MyClass {
public static void main(
String args[]) {
TextArea ta = new TextArea();
}
}
--------------------------------------------
[2]True or False:
A given MouseEvent CANNOT be dispatched to both MouseMotionListener and MouseListener objects that have registered with the screen component.
-----------------------------------------------
[3]True or False:Only Frames can contain menu bars or pull-down menus.
-----------------------------------------------
[4]What is the target in an Event?
A. The Object() where the event came from.
B. The Object() where the event is destined for.
C. What the Object() that generated the event was doing.
-----------------------------------------------
[5] The following will add a Component 'comp' to a container 'c', if it's layout is governed by GridLayout 'g'?
g.addLayoutComponent("ComponentName",comp);
** can u pl explain the above method? it's from some mock-exam..i didn't get it.
-----------------------------------------------
[6] Can u pl tell what does the statement at //3 actually do(in a general way)?
import java.awt.*;
public class TestClass extends Frame
{
Button b = new Button("OK");
TestClass( )
{
add("South", b);
this.setSize(400, 400); //1
b.setVisible(true); //2)
this.getLayout().layoutContainer(this); //3
this.setVisible(true); //4
}
public static void main(String[] args)
{
new TestClass();
}
}