AJP ch1
60 Questions
47 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

AWT Means?

  • Abstract Windows Toolkit (correct)
  • Advanced Web Toolkit
  • Abstract Web Toolkit
  • Advanced Web Technology

Which is the immediate super class of Applet?

  • Container
  • Component
  • Frame (correct)
  • Panel

The setSize( ) method is defined by this class…

  • Applet
  • Component (correct)
  • Frame
  • Panel

Which class encapsulates a blank window upon which we can draw?

<p>Canvas (B)</p> Signup and view all the answers

What are the variables defined in ‘Dimension’ class?

<p>height and width (C)</p> Signup and view all the answers

If we want to hide the window, we can use this method…

<p>setVisible( ) (A)</p> Signup and view all the answers

Color class can create object of it using which of the following color

<p>RGB (A)</p> Signup and view all the answers

The setColor( ) is the method of which class?

<p>Graphics (B)</p> Signup and view all the answers

Which of the following style is not supported by Font class?

<p>Font.BOLD (D)</p> Signup and view all the answers

All the AWT controls are subclasses of which class?

<p>Component (A)</p> Signup and view all the answers

How you can remove all the controls from the applet?

<p>Using remove( ) method. (A)</p> Signup and view all the answers

Which of the following is passive AWT control?

<p>Label (A)</p> Signup and view all the answers

Which alignment is not supported by Label?

<p>Label.BASELINE (D)</p> Signup and view all the answers

How can we create Radio buttons?

<p>Using CheckboxGroup class (B)</p> Signup and view all the answers

How to add the names in choice controls?

<p>Using add( ) method (D)</p> Signup and view all the answers

Multiple selections are allowed in…

<p>List (C)</p> Signup and view all the answers

How can we copy the ‘List’s contents into ‘Choice’s contents

<p>This is not possible. (A)</p> Signup and view all the answers

What is default block-increment of Scrollbar?

<p>10 (A)</p> Signup and view all the answers

The immediate super class of TextArea is…

<p>Text Component (C)</p> Signup and view all the answers

Is it possible to change display character of TextField? How?

<p>Yes, by using setEchoChar( ) method (C)</p> Signup and view all the answers

Is it possible to center the text typed in TextField? How?

<p>Yes, by putting values in the constructor itself (D)</p> Signup and view all the answers

Which method is used to append the text at the end of TextArea?

<p>append( ) (A)</p> Signup and view all the answers

FlowLayout does not support this value of alignment…

<p>FlowLayout.BASELINE (D)</p> Signup and view all the answers

The setLayout( ) is the method of which class?

<p>Applet (A)</p> Signup and view all the answers

BorderLayout does not support this value of alignment…

<p>BorderLayout.MIDDLE (D)</p> Signup and view all the answers

The correct constructor of Insets( ) which uses the values is…

<p>Insets(int top, int left, int bottom, int right) (A)</p> Signup and view all the answers

The various controls supported by AWT are

<p>All of these (D)</p> Signup and view all the answers

The concept of the menu bar canbe implemented by using three java classes—

<p>All of these (D)</p> Signup and view all the answers

The most commonly used layout managers are

<p>All of these (D)</p> Signup and view all the answers

The constructor which the Text Event class defines.

<p>TextEvent(Object source, int event_type) (A)</p> Signup and view all the answers

In Java an event is an which specifies the change of state in the source

<p>Object (B)</p> Signup and view all the answers

The name of the event classes are

<p>All of these (D)</p> Signup and view all the answers

The classes and interfaces defined in AWT are contained within the package.

<p>java.awt.* (A)</p> Signup and view all the answers

Java packages such as ...... support the Event handling mechanism.

<p>All of these (D)</p> Signup and view all the answers

The general form to set a specific type of layout manager is

<p>void setLayout(LayoutManager lm) (A)</p> Signup and view all the answers

Some of the event listener interfaces are

<p>All of these (D)</p> Signup and view all the answers

The AWT container is an instance of the class which holds various components and other containers

<p>Container (B)</p> Signup and view all the answers

A checkbox is a control that consists of a

<p>Both a &amp; b (D)</p> Signup and view all the answers

Java applets are used to create applications

<p>Both a &amp; b (C)</p> Signup and view all the answers

In Java, events are all the activities that occur between

<p>Both a &amp; b (C)</p> Signup and view all the answers

  1. AWT means

<p>Abstract Window Toolkit (A)</p> Signup and view all the answers

Positions the components into five regions:east, west, north, south, center

<p>BorderLayout (A)</p> Signup and view all the answers

Arranges the components as a deck of cards such that only one component is visible at a time

<p>CardLayout (B)</p> Signup and view all the answers

Arranges the components horizontally

<p>FlowLayout (D)</p> Signup and view all the answers

Arranges the componemnts into grid

<p>GridLayout (C)</p> Signup and view all the answers

creates a dropdown list of textual entries

<p>Choice (A)</p> Signup and view all the answers

The Component class and MenuComponent class are the which represent the GUI components.

<p>Superclasses (B)</p> Signup and view all the answers

The Component class is an abstract class and so its are used to create components

<p>Subclasses (A)</p> Signup and view all the answers

The AWT classes can be roughly categorized into the following groups:

<p>All of these (D)</p> Signup and view all the answers

Panel is used for components

<p>Grouping (A)</p> Signup and view all the answers

An Applet is a of Panel:

<p>Subclass (A)</p> Signup and view all the answers

Window is used for windows

<p>Both a &amp; b (D)</p> Signup and view all the answers

The subclasses of Window are

<p>Both a &amp; b (C)</p> Signup and view all the answers

The CardLayout class defines the following constructors:

<p>CardLayout() // First Cardlayout(int hor, int ver) //second (A)</p> Signup and view all the answers

A menu bar represents

<p>A list of menus which can be added to the top of a top-level window (A)</p> Signup and view all the answers

Each menu is associated with a list of menu items:

<p>Drop-down (B)</p> Signup and view all the answers

The two types of menus which are given as follows:

<p>Both a &amp; b (C)</p> Signup and view all the answers

Regular menus are placed at the of the application window within a menu bar

<p>Top (A)</p> Signup and view all the answers

The interface is used to handle the menu events

<p>ActionListener (C)</p> Signup and view all the answers

The text field and text area controls create a area respectively

<p>Both a &amp; b (C)</p> Signup and view all the answers

More Like This

Java AWT and Event Driven Programming Quiz
10 questions
AWT Controls and Layout Managers Quiz
5 questions
Java AWT Unit 1 Quiz
32 questions

Java AWT Unit 1 Quiz

SupportingPulsar avatar
SupportingPulsar
Java Applet Programming Quiz
39 questions

Java Applet Programming Quiz

MatchlessClavichord avatar
MatchlessClavichord
Use Quizgecko on...
Browser
Browser