Slider A Slider Lets the user graphically select a value By sliding a knob within a bounded interval...
-
Upload
virgil-gray -
Category
Documents
-
view
218 -
download
3
Transcript of Slider A Slider Lets the user graphically select a value By sliding a knob within a bounded interval...
Slider A Slider
Lets the user graphically select a value By sliding a knob within a bounded interval
Can show both major tick marks and minor ones A listener can be added to listen for value property change
Example Refer to BouncingBallApp Eclipse project
A slider is added to control the speed of the ball movement
The rate property is bound to The current value shown by the slider
Allowing the rate to vary between 0 and 20
Video and Audio (Media)
Media Used to obtain the source of the media
Currently, JavaFX supports MP3, AIFF, WAV, and MPEG4 audio formats and MPEG-4 video formats
Video and Audio (MediaPlayer)
MediaPlayer Used to control and play the media
Video and Audio (MediaView)
MediaView Displays the video
Example 1 Refer to MediaDemo Eclipse project
Displays a video in a view play/pause button is used to play/pause video Rewind button is used to restart the video Slider is used to control the volume of the audio
Example 2 Refer to FlagAnthem Eclipse project
The images for Denmark, Germany, India, Norway, UK, USA
http://cs.armstrong.edu/liang/common/image/
The audio clips for national anthems http://cs.armstrong.edu/liang/common/audio/anthem