Introduction to Swing programming I ( COMPUTER SCIENCE )
JSlider You use the JSlider in applications to allow for a change in a numerical value. It's a quick and easy way to let users visually get feedback on not only their current choice, but also their range of acceptable values. If you think about it, you could provide a text field and allow your user to enter a value, but then you'd have the added hassle of ensuring that the value is a number and also that it fits in the required numerical range. As an example, if you have a financial Web site, and it asks what percent you'd like to invest in stocks, you'd have to check the values typed into a text field to ensure they are numbers and are between 0 and 100. If you use a JSlider instead, you are guaranteed that the selection is a number within the required range. In Swing, a JSlider looks like this:
Written for
Document information
- Uploaded on
- September 17, 2021
- Number of pages
- 34
- Written in
- 2021/2022
- Type
- Class notes
- Professor(s)
- Prof. agarwal, pankaj k.
- Contains
- All classes
Subjects
-
introduction to swing programming i computer science