Create a vertical slider with min=0, max=100, value=50 : Slider « Swing JFC « Java

Home
Java
1.2D Graphics GUI
2.3D
3.Advanced Graphics
4.Ant
5.Apache Common
6.Chart
7.Class
8.Collections Data Structure
9.Data Type
10.Database SQL JDBC
11.Design Pattern
12.Development Class
13.EJB3
14.Email
15.Event
16.File Input Output
17.Game
18.Generics
19.GWT
20.Hibernate
21.I18N
22.J2EE
23.J2ME
24.JavaFX
25.JDK 6
26.JDK 7
27.JNDI LDAP
28.JPA
29.JSP
30.JSTL
31.Language Basics
32.Network Protocol
33.PDF RTF
34.Reflection
35.Regular Expressions
36.Scripting
37.Security
38.Servlets
39.Spring
40.Swing Components
41.Swing JFC
42.SWT JFace Eclipse
43.Threads
44.Tiny Application
45.Velocity
46.Web Services SOA
47.XML
Java » Swing JFC » Slider 




Create a vertical slider with min=0, max=100, value=50
  
import javax.swing.JSlider;

public class Main {
  public static void main(String[] argvthrows Exception {

    JSlider slider = new JSlider(JSlider.VERTICAL);
  }
}

   
    
  














Related examples in the same category
1.Creating a JSlider Component
2.Create a horizontal slider with custom min, max, and value
3.Create a vertical slider with custom min, max, and value
4.Make the horizontal slider move right-to-left
5.Make it vertical and move bottom-to-top
6.Make it vertical and move top-to-bottom
7.Get the extent
8.Getting and Setting the Values of a JSlider Component
9.Drawing with Swing, using a JSliderDrawing with Swing, using a JSlider
10.Using progress bars and slidersUsing progress bars and sliders
11.A slider with tick marks and labels
12.An example of JSlider with default labelsAn example of JSlider with default labels
13.Set minor tick marks every 5 units
14.Set major tick marks every 25 units
15.Slider SampleSlider Sample
16.JSlider Sample 2JSlider Sample 2
17.Slider ChangeListenerSlider ChangeListener
18.Inverted SlidersInverted Sliders
19.Slider change action listenerSlider change action listener
20.Date sliderDate slider
21.Tick SlidersTick Sliders
22.Scroll SliderScroll Slider
23.Text SliderText Slider
24.Change the minimum value
25.Change the maximum value
26.Set the extent
27.Move the slider by a fixed amount: the extent.
28.Set all the values at once by using the model
29.Set the value; the new value will be forced into the bar's range
30.Listening for Value Changes in a JSlider Component
31.Constraining JSlider Component Values to Tick Marks
32.Determine if currently snapping to tick marks
33.Snap to tick marks
34.Set to a spot between tick marks; the value moves to closest tick mark
35.Determine if currently painting labels
36.Showing Tick Marks on a JSlider Component
37.Show tick marks
38.The slider allows you to use an arbitrary label at any particular major tick mark.
39.Showing Tick-Mark Labels on a JSlider Component
40.Hide the track
41.Sample SlidersSample Sliders
42.A frame with many sliders and a text field to show slider valuesA frame with many sliders and a text field to show slider values
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.