wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JavaFX

Total questions: 12

Worksheet time: 8mins

Name
Class
Date
1.

What is the entry point for all JavaFX applications ?

a)

main()

b)

start()

c)

package()

d)

class()

2.

Which class represents a window in Java FX ?

a)

scene

b)

stage

c)

application

d)

pane

3.

Create btn object of class Button (put space between words)?

(a)  

4.

Set text "Solutions" on the object btn !

(a)  

5.

Which method will we use if we want to set the width of the object btn ?

a)

setWidth()

b)

setMinWidth()

c)

setW()

d)

setWth()

6.

What is not JavaFX node ?

a)

Button

b)

ImageView

c)

Picture

d)

Text

7.

Fill in the blank !!!

btn.setOnAction(new EventHandler< (a)   >() {

@Override

public void handle(ActionEvent event) {

System.out.println("Hello World!");

}//end method handle

});//end setOnAction

8.

Which pane we will use if we want to put buttons in the horizontal line ?

(a)  

9.

How to add object btn to the Root Node

(a)  

10.

Which panel does not exist in JavaFX ?

a)

GridPane

b)

TilePane

c)

FlowPane

d)

LinePane

11.

Which root node allows you to place Nodes anywhere

a)

Group

b)

AnchorPane

c)

Border Pane

d)

Grid Pane

12.

What are the properties of Stage ?

a)

title

b)

node

c)

shape

d)

scene