Ques 251. Which containers use a border layout as their default layout?
The Window, Frame and Dialog classes use a border layout as their default layout.
Is it helpful?
Add CommentView Comments
Ques 252. Can you write a Java class that could be used both as an applet as well as an application?
Yes. Add a main() method to the applet.
import java.awt.*;
import java.applet.*;
import java.util.*;
public class AppApp extends Applet
{
public void init()
{
add(new TextArea("Welcome to withoutbook.com"));
String ar[]=new String[2];
ar[0]="Welcome to withoutbook.com";
main(ar);
}
public void main(String args[])
{
System.out.println(args[0]);
}
}
Is it helpful?
Add CommentView Comments
Ques 253. What is the advantage of the event-delegation model over the earlier event-inheritance model?
The event-delegation model has two advantages over the event-inheritance model. First, it enables event handling to be handled by objects other than the ones that generate the events (or their containers). This allows a clean separation between a component's design and its use. The other advantage of the event-delegation model is that it performs much better in applications where many events are generated. This performance improvement is due to the fact that the event-delegation model does not have to repeatedly process unhandled events, as is the case of the event-inheritance model.
Is it helpful?
Add CommentView Comments
Ques 254. What are java beans?
JavaBeans is a portable, platform-independent component model written in the Java programming language, developed in collaboration with industry leaders. It enables developers to write reusable components once and run them anywhere ' benefiting from the platform-independent power of Java technology. JavaBeans acts as a Bridge between proprietary component models and provides a seamless and powerful means for developers to build components that run in ActiveX container applications. JavaBeans are usual Java classes which adhere to certain coding conventions: 1. Implements java.io.Serializable interface 2. Provides no argument constructor 3. Provides getter and setter methods for accessing it'??s properties
Is it helpful?
Add CommentView Comments
Ques 255. What is a DatabaseMetaData?
Comprehensive information about the database as a whole.