How to handle multiple listeners on stateChanged
Until now, I only had a slider activitating stateChanged and to change page clicked on the tab: that didn't need any code from me, it just happened (I assumed it is inherent to tab properties). Now I need to know, within the code, when the tab is clicked - and that's where I get confused.
My stateChanged listener doesn't seem to leave any scope for alerting me of anything other than the slider being moved.
Code for slider:
public void stateChanged(ChangeEvent e)
JSlider slider1 = (JSlider)e.getSource();
sensitivity = (int)slider1.getValue();
How do I incorporate a "tab-selected" option within the listener?