ProgressIndicator is a part of JavaFX package. It’s a circular control which is used for indicating progress, either infinite or finite. Often used with the Task API for representing the progress of background Tasks. It usually shows the amount of completion of a task.
Constructor of the class are
- ProgressIndicator(): creates a new intermediate progress Indicator.
- ProgressIndicator(double p): creates a progress Indicator with a specified progress
Commonly used methods
|isIndeterminate()||Gets the value of the property indeterminate.|
|getProgress()||Gets the value of the property progress.|
|setProgress(double v)||Sets the value of the property progress|
Below program illustrate the use of Progress Indicator:
Program to create Progress indicator: This program creates a progress indicator indicated by the name pb. The progress indicator will be created inside a scene, which in turn will be hosted inside a stage. The function setTitle() is used to provide title to the stage. Then a tile pane is created, on which addChildren() method is called to attach the progress indicator and the button inside the scene. Finally the show() method is called to display the final results.
Note : The following Programs might not run in an online IDE please use an offline Compiler.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- JavaFX | ChoiceDialog
- JavaFX | MenuButton
- JavaFX | Tooltip
- JavaFX | ChoiceBox
- JavaFX | Arc with examples
- JavaFX | Box with examples
- JavaFX | TextInputDialog
- JavaFX | Tab Class
- JavaFX | Pos Class
- JavaFX | Checkbox
- JavaFX | ProgressBar
- JavaFX | TextField
- JavaFX | Label
- JavaFx | PasswordField
- JavaFX | CustomMenuItem
- JavaFX | HBox Class
- JavaFX | ColorInput Class
- JavaFX | BorderPane Class
- JavaFX | FlowPane Class
- JavaFX | AnchorPane Class
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : ManasChhabra2