Task 1. Position of the mouse
Write a program which shows the position (coordinates x and y) of the mouse when the mouse button is pressed. The information must be placed at the same place where the mouse button has been pressed. Once the mouse button is released, the information must disappear.
Example of the output:
Task 2. Flag
Upgrade the flag program of the last home assignment as follows. If the window is resized using the mouse, the flag has to be resized accordingly.
Hints:
There is no particular event for resizing the window; therefore, apply the change listener to the stage properties (widthProperty and heightProperty). Create a method for the canvas drawing and call it when the size of the window is changed. Bind the size of the canvas with the size of the window using the method bind() (e.g. myCanvas.widthProperty().bind(myStage.widthProperty());
). More info about binding is here.
Task 3. Calculator
Write a program which creates a calculator window. Add event handlers. All buttons must function.
Example of the output: