i am trying to put JSlider at bottom of application but it doesn't work. JSlider actually works, display everything, i just have to set it in bottom that only remain.
if anyone knows it then suggest me what i will have to do ?
my code :
final JSlider slider1 ;
slider1 = new JSlider(JSlider.HORIZONTAL,0,5,1);//direction , min , max , current
slider1.setMajorTickSpacing(100);
slider1.setMinorTickSpacing(25);
slider1.setPaintLabels(true);
slider1.setPaintTicks(true);
slider1.setPaintTrack(true);
slider1.setAutoscrolls(true);
slider1.setPreferredSize(new Dimension(200,50));
add(slider1);
slider1.addChangeListener(new ChangeListener()
{
@Override
public void stateChanged(ChangeEvent arg0)
{
// TODO Auto-generated method stub
fval=slider1.getValue();
repaint();
}
});
any suggestion please...