YouTube Icon

Interview Questions.

Top 100+ Awt (abstract Window Toolkit) Interview Questions And Answers - May 27, 2020

fluid

Top 100+ Awt (abstract Window Toolkit) Interview Questions And Answers

Question 1. What Are Awt Peers?

Answer :

A factor is related to a preferred AWT button item, a peer item and an interfacing button item constructed in step with the native GUI.

Question 2. What Is The Difference Between A Swing And Awt Components?

Answer :

AWT components re heavy weight, whereas Swing additives are lightweight.
Heavy weight components depend upon the neighborhood windowing toolkit.
For instance, java.Awt.Button is a heavy weight element, whilst it's far strolling on the Java platform for Unix platform, it maps to a real Motif button.

Java Script Interview Questions
Question three. What Are The Different Types Of Controls In Awt?

Answer :

The AWT helps the following forms of controls:

Labels, Pushbuttons, Checkboxes, Choice lists, Lists, Scroll bars, Text additives
These controls are subclasses of issue.
Question four. What Are The Benefits Of Swing Over Awt?

Answer :

Swing additives are light weight.
We will have a pluggable appearance and feel function which suggests us how they appear in other platforms.
We can upload photographs to Swing additives. We have toolbars and tooltips in Swing.
Java Script Tutorial
Question five. What Are The Component And Container Class?

Answer :

A factor is a graphical item.

A few examples of components are:

Button
Canvas
Checkbox
Choice and so on.
JavaServer Faces (JSF) Interview Questions
Question 6. What Is The Use Of The Window Class?

Answer :

The window magnificence can be used to create a plain, naked bones window that does not have a border or menu.
The window elegance also can be used to show creation or welcome monitors.
Question 7. What Is Clipping?

Answer :

Clipping is the system of confining paint operations to a confined area or form.

JavaServer Faces (JSF) Tutorial Java Swing Interview Questions
Question eight. What Is The Parameter Specification For The Public Static Void Main Method?

Answer :

String args []
String [] args
Question nine. What Is The Difference Between The Paint() And Repaint() Method?

Answer :

The paint() approach supports portray thru a Graphics object.
The repaint() approach is used o reason paint() to be invoked by means of the AWT painting thread.
Java applet Interview Questions
Question 10. What Interface Is Extended By Awt Event Listener?

Answer :

The java.Util.EventListener interface is extended by all the AWT occasion listeners.

Java Swing Tutorial
Question 11. What Is A Container In A Gui?

Answer :

A Container consists of and arranges different components via the use of format managers, which use unique layout policies to decide where components should pass as a function of the scale of the box.

Java Interview Questions
Question 12. What Is The Default Layout For Applet?

Answer :

The default format supervisor for an Applet is FlowLayout, and the FlowLayout supervisor attempts to honor the desired length of any components.

Java Script Interview Questions
Question thirteen. Name Components Subclasses That Support Painting?

Answer :

The Canvas
Frame
Panel and
Applet training guide painting
Java Tutorial
Question 14. What Is The Difference Between A Menuitem And A Checkboxmenuitem?

Answer :

The CheckboxMenuItem class extends the MenuItem class to guide a menu item that can be checked or unchecked.

Question 15. How Are The Elements Of Different Layouts Organized?

Answer :

FlowLayout: The elements of a FlowLayout are prepared in a top to bottom, left to right style.

Border Layout: The elements of a BorderLayout are prepared on the borders and the centre of a container.

CardLayout: The factors of a CardLayout are stacked, on the pinnacle of the alternative, like a deck of cards.

GridLayout: The elements of a GridLayout are same length and are laid out using the rectangular of a grid.

GridBagLayout: The factors of a GridBagLayout are prepared according to a grid.

JavaMail API Interview Questions
Question 16. What Is The Difference Between Grid And Gridbaglayout?

Answer :

In Grid layout the scale of each grid is constant in which as in GridbagLayout grid length can various.

JavaMail API Tutorial
Question 17. What Is A Layout Manager?

Answer :

A format manager is an object that is used to organize components in a field.

Java eight Interview Questions
Question 18. Where The Cardlayout Is Used?

Answer :

CardLayout is used where we want to have a group of panel or frames one laying over some other. It is changed via TabbedPane in Swing.

JavaServer Faces (JSF) Interview Questions
Question 19. Which Container May Contain A Menu Bar?

Answer :

Frame

Java eight Tutorial
Question 20. What Are The Types Of Checkboxes?

Answer :

Java helps two styles of checkboxes.

They are:

Exclusive and
Non exclusive
JSON (JavaScript Object Notation) Interview Questions
Question 21. What Is The Difference Between Exclusive And Non Exclusive?

Answer :

Exclusive: Only one in all a group of gadgets can be decided on at a time. If an item from the organization is chosen, the checkbox currently checked is deselected and the brand new choice is highlighted. The extraordinary Checkboxes also are known as as Radio buttons.

Non Exclusive: Checkboxes aren't grouped together and each one may be selected of the other.

Question 22. What Is Paint Method?

Answer :

The AWT uses a Callback mechanism for painting which is the identical for heavyweight and light-weight components.

JSON (JavaScript Object Notation) Tutorial
Question 23. What Is The Purpose Of Repaint Method?

Answer :

repaint() requests can erase and redraw (update) after a small time display. When you invoke repaint().

The Java Debugger (JDB) Interview Questions
Question 24. Which Containers Use A Border Layout As Their Default Layout?

Answer :

Window Frame and Dialog instructions use a Border Layout as their format.

Java Swing Interview Questions
Question 25. What Is Meant By Controls?

Answer :

Controls are additives that allow a consumer to engage along with your software.

The Java Debugger (JDB) Tutorial
Question 26. What Is The Difference Between Choice And List?

Answer :

A preference is displayed in a compact from that calls for you to tug it all the way down to see the list of available alternatives and handiest one object can be decided on from a desire.

A list may be displayed in such a way that numerous listing items are visible and it helps the selection of 1 or greater listing objects.

JFace Interview Questions
Question 27. What Is The Difference Between A Window And A Frame?

Answer :

The Frame class extends Window to outline a primary utility window that may have a menu bar.

Java applet Interview Questions
Question 28. What Are The Subclasses Of The Container Class?

Answer :

The field class has 3 foremost subclasses.

They are:

Window
Panel
ScrollPane
Question 29. Which Method Is Method To Set The Layout Of A Container?

Answer :

setLayout ()

Question 30. What Are The Default Layouts For A Applet, A Frame And A Panel?

Answer :

For an applet and a panel, Flow format, and The FlowLayout manager attempts to honor the desired length of any additives.

Question 31. What Is The Difference Between A Scrollbar And A Scrollpane?

Answer :

A Scrollbar is a component, however now not a box.
A Scrollpane is a container.
A Scrollpane handles its personal activities and performs its personal scrolling.
Question 32. Which Method Will Cause A Frame To Be Displayed?

Answer :

.Show()
.SetVisible()
Question 33. How Can We Get All Public Methods Of An Object Dynamically?

Answer :

getMethods(): It return an array of method items corresponding to the general public methods of this magnificence.

GetFields(): It returns an array of Field objects similar to the public Fields (variables) of this magnificence.

GetConstructors: It returns an array of constructor gadgets similar to the public constructors of this magnificence.

Java Interview Questions
Question 34. Which Component Subclass S Used For Drawing And Painting?

Answer :

Canvas

Question 35. Define Canvas?

Answer :

It is a simple drawing surface that is used for portray snap shots or to carry out different graphical operations.

What is the difference between the Font and FontMetrics lessons?

The FontMetrics class is used to define implementation particular houses such as ascent and descent, of a Font item.

Question 36. Explain The Use Of Update Method?

Answer :

An replace technique is referred to as on calling the repaint approach.

The default implementation of the update() method clears the display screen and calls the paint() technique.

JavaMail API Interview Questions
Question 37. Which Containers Use A Flowlayout As Their Default Layout?

Answer :

The Panel and the Applet training use the Flow Layout as their default format.

Question 38. What Are The Subclass Of Textcomponent Class?

Answer :

TextField and TextArea




CFG