Why does it get smaller when it's suppose to get bigger
So when you slide the slider the text is suppose to get BIGGER not SMALLER...anybody know what I've done wrong??
sentenceLabel=new JLabel ("Music Volume");
sentenceLabel.setFont (new Font ("Serif", Font.BOLD, 12));
slider=new JSlider (1,5,1);
public void stateChanged (ChangeEvent event)
sentenceLabel.setFont (new Font ("Serif", Font.BOLD, Size));
Re: Why does it get smaller when it's suppose to get bigger
Are you sure you're increasing the slider value? Put a println statement inside your ChangeListener and see if you are indeed dragging the slider the correct direction.
Also, the value of the slider could be moved below or above the initial size so you'd have an instantaneous change in size at the first slider movement.