Search Header Logo

CSL203 OOP Lab Continuous Assessment Viva Cycle5

Authored by Sajith B

Computers

University

Used 6+ times

CSL203 OOP Lab Continuous Assessment  Viva Cycle5
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the Java Event Delegation Model, what is the role of the event source?

Listens for events

Fires events

Handles events

Processes events

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Java, which method is invoked when an action event occurs?

doAction()

actionPerformed()

onEvent()

handleAction()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the addActionListener method in Java event handling?

To remove an action listener

To add an action event

To register an action listener for a component

To handle keyboard events

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When using setBounds for a component in Java Swing, what parameters does it typically take?

setBounds(x, y, width)

setBounds(x, y, width, height)

setBounds(width, height, x, y)

setBounds(x, y, height, width)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of setLayout(null) in Java Swing?

It removes all components from the container.

It sets the default layout manager for the container.

It enables absolute positioning of components using setBounds.

It aligns components in a flow layout.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to clear the text content of a JTextField?

clearText()

resetText()

setText("")

clear()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If you want to use components like JLabel and JButton, which package would you import?

java.awt

java.awt.event

javax.swing

java.swing.event

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?