Tuesday, 14 February 2012

What are the features of JFC? | Core Java

Mainly features are there :
  1.  Pluggable Look-and-Feel,
  2.  Accessibility API,
  3.  Java 2D API,
  4.  Drag and
  5.  Drop Support.

What is default Look-and-Feel of a Swing Component? | Core Java

Java Look-and-Feel is the default Look-and-Feel of the Swing Component.

What is Canvas ? | Core Java

Canvas is bassically a Component of the subclass which is used for drawing and painting. Canvas is a rectangular area where the application can draw or trap input events.

What interface is extended by AWT event listeners? | Core Java

java.util.EventListener interface is extented by all AWT event listeners.

What is the difference between the paint() and repaint() methods? | Core Java

Main diff are there :
  1.  The paint() method : Its supports painting via a Graphics object.
  2.  The Repaint() method : It is used to cause paint() to be invoked by the AWT painting thread.

How can a GUI component handle its own events? | Core Java

A Component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.

What is the relationship between an event-listener interface and an event-adapter class? | Core Java

An Event-listener interface bassically defines the methods , WHich  must be implemented by an event handler for a particular kind of event. An event adapter provides a default implementation of an event-listener interface.