Created
June 17, 2015 00:31
-
-
Save Vaysman/4226e0da5f4ba65a8670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package trash; | |
import javax.swing.*; | |
import java.awt.*; | |
public class JSliderDemo { | |
private JFrame frame = new JFrame("Slider"); | |
private JSlider slider = new JSlider(1, 50, 1); | |
public JSliderDemo() { | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
frame.setSize(new Dimension(100, 100)); | |
frame.add(slider); | |
} | |
public static void main(String[] args) { | |
JSliderDemo sliderDemo = new JSliderDemo(); | |
sliderDemo.start(); | |
} | |
private void start() { | |
SwingUtilities.invokeLater(() -> frame.setVisible(true)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment