So when you slide the slider the text is suppose to get BIGGER not SMALLER...anybody know what I've done wrong??
int height=100; int width=300; setSize(width, height); setLocation (0,0); sentenceLabel=new JLabel ("Music Volume"); sentenceLabel.setFont (new Font ("Serif", Font.BOLD, 12)); slider=new JSlider (1,5,1); slider.setPaintTicks(true); slider.setMajorTickSpacing (1); slider.setPaintLabels(true); sizeAction=new ChangeListener() { public void stateChanged (ChangeEvent event) { JSlider slider=(JSlider)event.getSource(); Size=slider.getValue(); sentenceLabel.setFont (new Font ("Serif", Font.BOLD, Size)); } }; slider.addChangeListener(sizeAction); add (slider); add (sentenceLabel); }