go to previous page   go to home page   go to next page highlighting

Answer:

Yes. For example, if you double the resolution of the monitor, twice as many pixels now correspond to the width of the monitor. The width of the rectangle will be half the previous width. Of course, the physical glowing dots of the monitor don't change. But now 300 pixels correspond to fewer glowing dots.


Application Life Cycle

All JavaFX programs must extend the Application class. The JavaFX runtime system follows these steps when your program starts:

1. Construct an instance of your extension of the Application class.

Your object will inherit the methods of Application. You can override these methods.

2. Call the init() method.

The init() method is a member of the Application class. As defined in that class, it does nothing. Your class (which extends Application) can override it to perform initialization tasks on start-up. You might open a file, read parameters from the command line, or ask the user for values from the command line.
For now, you can just ignore init().

3. Call your start(Stage) method.

The start() method, as defined in Application, is abstract, so you must override it.
The start() method puts graphical objects in a Scene and puts a Scene on the Stage. User interaction can be set up. The start() method runs to its end.

4. Wait for the application to finish.

The window (Stage) stays on the screen until the close button is clicked or it is closed by some other means.

5. Call the stop() method.

This method is defined in Application, but does nothing. You might implement it in your Application to close the files or databases opened in the init() method. For now, you can ignore stop().

QUESTION 8:

What (do you suppose) this statement does:

Circle circ = new Circle();

go to previous page   go to home page   go to next page