Graphics with JavaFX Flashcards
1) AWT
A______________ W___________________ T_________________
Used in the early days.
Abstract Window Toolkit
2) Purpose of AWT
The idea with AWT was to provide a system of graphics in which any component that we create is associated with the corresponding component in the n_______ operating system.
So, if you used Windows, the buttons and other elements that you created would look like normal Windows buttons and elements.
native
3) Pros of AWT
a) familiarity - the graphics that you created would be the same as the WindowsTM graphics.
N.B. Components that rely on the native operating system make extensive use of the system’s resources and are therefore described as h_________ components.
heavyweight
4) Cons of AWT
a) Used a lot of resources
b) functional differences between o_________ systems
operating
5) Swing
AWT was replaced by a package called Swing.
Swing classes are for the most part written in Java.
They do not rely on the system components they are known as l___________
components.
Swing was the main platform for producing Java Graphics from 2000 - ________
lightweight
2014
6) AWT Vs Swing
Unlike AWT, Swing c_____________ look the same regardless of the operating system
the program is running on.
components
7) JavaFX the new technology
Swing’s look and feel became rather old-fashioned compared to today’s graphics.
With the release of Java __ in 2014 came the latest version of a new technology known as JavaFX.
It was also announced that Swing will not be d________ f_________ (although it will continue to be packaged with Java).
8
developed further
8) JavaFX
A JavaFX program is referred to as an a____________.
Your JavaFX class will extend the Application class, for which you need the following import statement:
import javafx.application.Application
application
9) Stage
The window in which an application is run is called a stage.
If you run the program in full-screen mode, then the screen becomes the stage.
Some applications can be made to run in a browser, in which case the browser is the stage.
So basically, the area in which the program is run, is called the ‘Stage’.
Q: What do you think the contents of the stage are called?
A: The scene/scenes
10) Scenes
The contents of the stage—the graphic itself (in its entirety) —is called a scene, and is often referred to as a
s______ g_______.
scene graphic
11) Nodes
The items that make up the scene are referred to as nodes.
E.g. Buttons, text fields, labels, and checkboxes, which are often referred to collectively as c_______.
They can also be 2D or 3D graphics shapes.
controls
12) Nodes as Containers
Containers are c__________ that hold other n________, and each container arranges the nodes in a particular way—for example, vertically, horizontally, in a grid, or stacked one on top of the other.
Normally, we wouldn’t see the container.
components
nodes
13) Containers
Importantly, containers can contain other containers, so we can develop a h_________ in our scene. We normally place a single top level node in our scene, and this is referred to as the r_____ node. We use the terms parent and
children for the containing and contained nodes respectively.
hierarchy
root