In the end it should look like this
I have a slider in a panel, that goes from 0 to 100. I want, that there is a name left of the slider and that after the name there is the current number the slider is currently at. In the picture there slider is currently at 10.
At the Moment I only have
class tester extends javax.swing.JFrame{
Jframe frame = new JFrame;
BorderLayout borderlayout = new BorderLayout();
private void test() {
JPanel panel = new JPanel();
add(panel, borderlayout.CENTER); // the panel is in the center of the frame
panel.setLayout(new javax.swing.BoxLayout(panel, BoxLayout.Y_AXIS));
JSlider testslider= new JSlider(0,100);
panel.add(testslider);
}
}
So a very standard slider. How do I get a name left of the slider and the current value on it?