Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DADT02 APP JavaFX

Total questions: 7

Worksheet time: 4mins

Name
Class
Date
1.

What is the primary purpose of JavaFX in Java programming?

a)

To build web applications

b)

To create graphical user interfaces (GUIs)

c)

To manage database

d)

To perform mathematical computations

2.

Which JavaFX class is used as the starting point for creating an application?

a)

javafx.scene.Scene

b)

javafx.application.Application

c)

javafx.stage.Stage

d)

javafx.control.Control

3.

In JavaFX, what is a Stage?

a)

A container for scenes

b)

A graphical component like a button or label

c)

A method to execute the program

d)

A layout manager

4.

What does the Scene class represent in JavaFX?

a)

The application title

b)

The main entry point for the application

c)

The content displayed in the window

d)

The structure for animations

5.

The start() methods in JavaFX is used to initialize and show the primary stage

a)

True

b)

False

6.

Fill in the blank: In JavaFX, the ____________ class is used to display a single-line text element

a)

Button

b)

Label

c)

TextField

d)

TextArea

7.

What happens if you forget to call primaryStage.show() in a JavaFX application?

a)

The application will not compile

b)

The application will not display the GUI window

c)

The application will run normally

d)

The application will throw an exception