Latest Tutorials| Questions and Answers|Ask Questions?|Site Map




Have Programming Question? Ask it here!
 
 
 


Poonam
slider
1 Answer(s)      4 years and 10 months ago
Posted in : Swing AWT



Advertisement
View Answers

October 6, 2009 at 10:06 AM


Hi Friend,

Try the following code:

import java.awt.*;
import javax.swing.*;

public class JSliderExample {
public static void main(String args[]) {
JFrame frame = new JFrame("JSlider Example");
Container content = frame.getContentPane();
JSlider slider = new JSlider();
slider.setValue(70);
slider.setMinorTickSpacing(5);
slider.setMajorTickSpacing(10);
slider.setPaintTicks(true);
slider.setSnapToTicks(true);
slider.setPaintTrack(true);
slider.setPaintLabels(true);
slider.setToolTipText("The value is 50");
content.add(slider, BorderLayout.CENTER);
frame.setSize(300, 100);
frame.setVisible(true);
}
}

For more information,visit the following link:

http://www.roseindia.net/java/example/java/swing/CreatSlider.shtml

Thanks


Related Tutorials/Questions & Answers:
Image slider in JQuery
Image slider in JQuery  Hi sir I want to create a image slider in jQuery. Please tell me the name of the best image slider plug-in available. Mention code with your reply
Dojo Slider
Dojo Slider          In this section, you will learn about slider and how to create a slider in dojo. Try Online: Slider Slider : A slider is a GUI
Advertisements
Slider in Flex4
Slider control in Flex4: Flex4 Slider control is also called a Spark Slider control. You can select a value by moving a slider thumb between two end points of the Slider track. There are two types of Slider control. First is VSlider
Changing 2D graph using slider.
Changing 2D graph using slider.  Code for changing a 2d graph with help of slider
slider - Swing AWT
Example"); Container content = frame.getContentPane(); JSlider slider...(true); slider.setToolTipText("The value is 50"); content.add(slider
Vertical news slider using jquery
Vertical news slider using jquery  how to creatw vertical news slider using jquery Sorry for wrong category but i cant get my jquery category
jQuery UI Widget : Slider
jQuery UI Widget : Slider       jQuery UI Widget : Slider The jQuery UI Slider plugin makes selected elements into sliders. There are various
iPhone Slider Example
In this application we are going to create slider by using Window based application. There is  .h and  .m file.  We are going to add Slider... a Slider  and label from the library. label is used to display the value of slider
Slider Gallery plug-in
Slider Gallery plug-in In this section, you will learn to use Slider Gallery plug-in for developing image gallery slider. This shows a demonstration of a slider widget from the jQuery UI library .In this example a image gallery inside
how to create a slider on jsp page n slider has values from 0-4
how to create a slider on jsp page n slider has values from 0-4  i want to create a slider on jsp page and slider has values from 0-4   Using the jquery, you can create a slider in jsp. <html> <head> <
how to focus dojo slider to a particular value and then disabling dojo slider so that value not changes on clicking?
how to focus dojo slider to a particular value and then disabling dojo slider so that value not changes on clicking?  How to focus dojo slider to a particular value (say 2.5 )on the slider and then disabling dojo slider so
java image slider or code 4 java-image slideshow
java image slider or code 4 java-image slideshow   plz help me out with java code for running an application in which images wil slide automatically... image slider using java
Java Slider Example,Java JSlider,Slider Component in Java Swing,JSlider Source Code Java
to create a JSlider component of Java Swing. A Slider is the tool of swing through... on the JSlider component have also been shown. If you increase or decrease the slider by selecting then the actual position of the slider will be displayed
Reversing dojo slider to make it slide from right to left rather left to right as given
Reversing dojo slider to make it slide from right to left rather left to right as given  I am using Dojo slider in my project But i want to reverse the slider chosen value so that it slides from right to left ie the blueish part
Dojo Slider
Dojo Slider        ... about slider and how to create a slider in dojo. Slider : A slider is a GUI (Graphical User Interface) component. In other words a slider is a scale with handle
Dojo Slider
Dojo Slider        ... about slider and how to create a slider in dojo. Slider : A slider is a GUI (Graphical User Interface) component. In other words a slider is a scale with handle
The easy Slider plug-in of jQuery
The easy Slider plug-in of jQuery  In this tutorial, we will discuss...;> <head> <title>Easy Slider jQuery Plugin Demo</title>...; <div id="header"> <h1>Example of Easy Slider Plugin
Change Listener
Java: Change Listener Introduction Listeners and getting the slider value Add a change listener to the slider so that it will be called when the slider... repeatedly while the user is dragging the slider knob thru different values
The easy slider plug-in implementing with numeric boxes
The easy slider plug-in implementing with numeric boxes In this tutorial...://www.w3.org/1999/xhtml"> <head> <title>Easy Slider...; <h1>Example of Easy Slider Plugin of jQuery</h1> </div>
Hslider
; In this tutorial you'll come to know about the horizontal slider option of flex. We'll see how to set the range of the slider, as well as we will come to know how to put the labels on the slider using labels option etc
HSlider in Flex
the value by moving the slider thumb between the end points of the slider track.... In general the minimum value of a slider is 0 and the maximum value is 10... DisplayLiveChangeValue(event:SliderEvent):void{ var currentValue:Slider=Slider
Sliders
Java: Sliders Introduction A slider (JSlider class) lets the user easily... and getting the slider value See Change Listener to see how to do something when the slider is changed. Advanced Appearance In addition to tick marks, you can specify
Fancy Box plug-in for Images
Fancy Box plug-in for Images In this section, you will learn how to use fancy box image slider plug-in for image display. This plug in is very easy to use but very effective to implement .The plug-in we are using here is "
Scrollbar
Scrollbar       A scrollbar is represented by a "slider" widget. The characteristics of it are specified by integer values which are being set at the time of scrollbar
Benefits of RIAs
used by the client side, including drag and drop, using a slider to change
UIButton
of the array. Here is my code: ... for (Slider *slider in sliders) { [slider trackSelectorBTN:Slider=2]; // Here is my Problem: How can I sent only the number
JSlider with RGB Colors
*; import javax.swing.event.*; import javax.swing.plaf.basic.*; class Slider extends JSlider{ private String type; private RangeSlider ui; public Slider(int... updateGradient(int othercolor, int othercolor2){ if ("Red".equals(((Slider
Flex VSlider Control
Slider in Flex:- If user want to select a value between two end points by moving slider thumb. These point are on the slider track. You want to access the current value of the slider is find by the current location of the slider thumb
JSlider Component of Java Swing
component of Java Swing. A Slider is a Swing tool which you can use for selecting... or decrease the slider by selecting then the actual position of the slider... component and performs various tasks related to the slider. Methods and APIs
need a java program for the following
the individual slider position, you set the color of the panel setBackground(new
jQuery plugin examples code
-in The easy Slider plug-in of jQuery The easy slider plug...-in jQuery 'Tab Slide Out' Plug-in Slider Gallery plug
Ajax widgets
, Slider, Date picker etc. that you can use in your applications. See jQuery UI
Color Composite Example
.  Following code shows the slider: slider = new JSlider... in the event source.   Following code shows the value for the slider...;JSlider slider;   JLabel label;   float 
Windows 8 Advantages and Disadvantages
this - Go to Change PC Settings and from there, move the slider to Turn OFF
Introduction to jQuery UI plug-in
  o Datepicker   o Dialog   o Progressbar   o Slider
Example code of jQuery animation
Slider gallery Moving Boxes Carousel with jQuery effect 1 Zoom
java - Java Interview Questions
rangeModel = new DefaultBoundedRangeModel(100,0,0,100); private JSlider slider = new...:")); panel.add(slider); panel.add(lable
Icon Changes at runtime
and width of the icon. The method g.fillOval(p, q, getIconWidth(), getIconHeight... BorderLayout is used. The slider showing width is directed to the north by BorderLayout.NORTH and the slider showing height is directed to the south
Mapping Objects to XML Files using Java 5 Annotations,java newsletter,java,tutorial
ComponenSlider class that manages a slider that can be configured using XML... = false; public ComponentSlider(JSlider slider, Element def.... Next, we create an XML file that contains the attributes for the Slider
dajo tutorial
the specified range of data.    Dojo Slider In this section, you will learn about slider and how to create a slider in dojo.  
DOJO, DOJO 1.0.2 tutorial, DOJO Tutorial
the specified range of data.    Dojo Slider In this section, you will learn about slider and how to create a slider in dojo.   Dojo Stack
Java Programming: Section 7.3
" along a bar. A slider can, optionally, be decorated with tick marks..., the second slider is decorated with ticks, and the third one is decorated with labels. It's possible for a single slider to have both types of decorations
Flex 4 Features
TextArea Label List DropDownList Spinner Slider NumericStepper
Sitemap Linux Tutorial
Iinline Date Text Box | Dojo NumberSpinner Button | Dojo Slider | Dojo Stack
Benefits of RIAs
a slider to change data, calculations performed only by the client
Rich Internet Application
a slider to change data, calculations performed only by the client
jQuery Demos
-in The easy Slider plug-in of jQuery The easy slider plug-in implementing with numeric boxes...-in jQuery 'Tab Slide Out' Plug-in Slider Gallery plug
Ajax Dojo Tutorial
;   Dojo Slider In this section, you will learn about slider and how to create a slider in dojo.   Dojo Stack Container
 

 

 

DMCA.com