AJP Unit-1

GlamorousHeliodor avatar
GlamorousHeliodor
·
·
Download

Start Quiz

Study Flashcards

70 Questions

A label is a simple control which is used to display_____________ on the window:

Text(non-editable)

Which type of container do not have any type of menubar?

Panel

MVC means Model View ___________

Controller

The interface is used to handle the menu events

ActionListener

The ActionListener interface is not used for handling action events?

False

Which class is used for this processing method processActionEvent()?

Button,List,MenuItem

Which event is generated when the position of scrollbar is changed?

AdjustmentEvent

A Frame's _______________ designates the area of the frame excluding the title,menu bar and the border.

ContentPane

At the top of the AWT hierarchy is the__________________ class.

Component

By default the Frame has a _______________________________

Titlebar,borders,resizing corners

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

setText()

BorderLayout b = new BorderLayout(3,4); The above statement is incorrect

True

By default flowlayout uses __________justification.

Center

Border Layout is divided into_________regions.

Five

Combobox is a combination of ________________________

TextField and Dropdown List

Default layout manager for Window is

Borderlayout

How To Apply Image To Button ?

using ImageIcon

In AWT Checkbox class is used to create __________

Checkbox and Radio buttons

How would you set the color of a graphics context called g to cyan?

g.setColor(Color.cyan);

AWT is heavy weight component

True

setMenuBar() method of which class?

MenuBar

In given constructor what 3rd parameter indictaes Scrollbar s=new Scrollbar(0,10,20,0,1000)

Size of thumb

In order to obtain currunt value of scrollbar at run time which method you will use

getValue()

What is point?

It Encapsulates a Cartesian coordinate pair, stored in x and y

what will be the output

Error

Which of the following are the methods of checkbox

Both a and b

What is API

Application Programming Interface

_____________ method returns currently selected item in choice.

getSelectedItem()

Which of the method can be used to output a String in an Applet?

drawString()

What are the types of DialogBox?

Modal and Modeless DialogBox

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

association

Panel class is a concrete sub-class of container.

True

When there is a switching condition like ON or OFF, which control is used of following?

ToggleButton

All Component on Container can be removed by calling following method

removeAll()

Canvas is a ________________

Window

Which is the container that contain title bar and can have MenuBars.It can have other components likenbutton,textfield etc.?

Frame

Which class provides many methods for graphics programming?

java.awt.Graphics

The getContentPane() method is of which clasS?

None of these

Frame is a standard window, which is _______________ of window class from AWT hierarchy?

Derived class / Subclass

Which of these classes can be added to any Container class, using the add method defined in Container class?

Button

The method _________________ places a Menu m into the MenuBar mb.

mb.add(m)

________________ is a swing class that allows to enter a singleline of text.

JTextField

The correct hierarchy for Panel is___________________

Component-Container-Panel

Controls not supported by awt are

TabbedPane,Table

Executable applet is nothing but _________ file of applet

.class

In FlowLayout manager the default space between each component is

5 Pixel

Scrollbar( ) creates a ______________ scroll bar by default.

Vertical

Text field usually called as

edit Control

The method setLabel can be used with what type of Object ?

TextField

To retrieve the current state of a check box,call


getState()

Which Among the below is not an AWT class.

RadioButton

Which of the following are the methods of choice

All of these

Which of the following is the correct method of scrollbar

int getOrientation()

Which class can be used to represent a checkbox with a textual label that can appear in a menu. Select the one correct answer.

CheckboxMenuItem

What will be the output of line 5

3

Which components are reuired to get following output

List and Button

Select one option

Label,TextField

Which is the correct constructor of GridLayout

GridLayout(int numrows, int numcols)

init() method exectues only once.

True

Which of the following controls does not support interaction with user?

Label

Select any one

Component class

Select any one

10 point Times New Roman

Which components are used in the following output

Button, TextField, Checkbox, Choice, TextArea

Choose the correct sequence for the following output

TextField, TextArea, Checkbox1, Checkbox2

Components in the frame is added at appropriate place using

setBounds(int,int,int,int)

Multiple layouts in the single conainer can be created with the help of


Panel

Say that a Frame contains three Panels. Could each Panel have a different layout manager?

Yes---each one can use setLayout() with any layout manager

Which statement with respect to inner class is true.

All Statements A,B,C are true

The set Background() method is part of which of the following class java.awt package

Component

How many types of controls does AWT supports these controls are Subclasses of component?

7

Test your knowledge of Java GUI controls, containers, and event handling with this quiz. Questions cover topics such as labeling controls, types of containers, MVC architecture, interface and event handling, and processing methods.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Mastering GUI Development in Java
10 questions
Java Swing GUI Components
10 questions

Java Swing GUI Components

BeneficentColumbus avatar
BeneficentColumbus
Java Swing GUI Overview
0 questions

Java Swing GUI Overview

BeneficentColumbus avatar
BeneficentColumbus
Use Quizgecko on...
Browser
Browser