MCQs > IT & Programming > Java MCQs > Java AWT And Swing MCQs

Java AWT And Swing MCQ

AWT more powerful components like tables, lists, scroll panes, color chooser, tabbed pane etc.?

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

These two ways are used to create a Frame

By creating the object of Frame class (association)

By extending Frame class (inheritance)

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

The following specifies the advantages of

It is lightweight.

It supports pluggable look and feel.

It follows MVC (Model View Controller) architecture.

Answer

Correct Answer: Swing

Note: This Question is unanswered, help us to find answer for this one

Which is used to store data and partial results, as well as to perform dynamic linking, return values for methods, and dispatch exceptions?

Answer

Correct Answer: Frame

Note: This Question is unanswered, help us to find answer for this one

Which is a component in AWT that can contain another components like buttons, textfields, labels etc.?

Answer

Correct Answer: Container

Note: This Question is unanswered, help us to find answer for this one

These four methods commonly used in?1)public void add(Component c)2)public void setSize(int width,int height)3)public void setLayout(LayoutManager m)4)public void setVisible(boolean)

Answer

Correct Answer: Component class

Note: This Question is unanswered, help us to find answer for this one

In which places can put the event handling code:

Answer

Correct Answer: All

Note: This Question is unanswered, help us to find answer for this one

By which method You can set or change the text in a Label?

Answer

Correct Answer: SetText()

Note: This Question is unanswered, help us to find answer for this one

Which class is used for this Processing Method processActionEvent( )?

Answer

Correct Answer: Button,List,MenuItem

Note: This Question is unanswered, help us to find answer for this one

In Graphics class Which method is used to set the graphics current color to the specified color?

Answer

Correct Answer: Public abstract void setColor(Color c)

Note: This Question is unanswered, help us to find answer for this one

The Following steps are required to perform


1) Implement the Listener interface and overrides its methods

2) Register the component with the Listener


Answer

Correct Answer:

Event Handling



Note: This Question is unanswered, help us to find answer for this one

The following way is used to create a frame is by creating the object of Frame class?

Answer

Correct Answer: Association

Note: This Question is unanswered, help us to find answer for this one

In Graphics class which method is used to draws a rectangle with the specified width and height?

Answer

Correct Answer: Public void drawRect(int x, int y, int width, int height)

Note: This Question is unanswered, help us to find answer for this one

The Java Foundation Classes (JFC) is a set of GUI components which simplify the development of desktop applications?

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

The Swing Component classes that are used in Encapsulates a mutually exclusive set of buttons?

Answer

Correct Answer: ButtonGroup

Note: This Question is unanswered, help us to find answer for this one