16th May Notes - Javafx
16th May Notes - Javafx
pane.setRotate(45);
pane.setStyle( "-fx-border-color: red;
-fx-background-color: lightgray;");
The javafx.scene.image.Image class represents a graphical image and is used for loading an
image from a specified filename or a URL.
The javafx.scene.image.ImageView is a node for displaying an image. An ImageView can
be created from an Image object.
Alternatively, you can create an ImageView directly from a file or a URL as follows:
OR
new Image("http://www.cs.armstrong.edu/liang/image/us.gif");
FlowPane
GridPane
There are various events in JavaFX i.e. MouseEvent, KeyEvent, ScrollEvent, DragEvent, etc.
We can also define our own event by inheriting the class javafx.event.Event.
The interface javafx.event.EventHandler must be implemented by all the event handlers and
filters.
KEY EVENT