public void colortemperatureJSliderStateChanged(ChangeEvent event) {
fahrenheitdegree = colortemperatureJSlider.getValue();
fahrenheitJPanel.setBounds(100,270, fahrenheitdegree, 20);
celsiusdegree = (fahrenheitdegree - 32.0)*5.0/9.0;
celsiusJPanel.setBounds(100,220,celsiusdegree, 20);
}// end of public void colortemperatureJSliderStateChanged..
My professor want both variables (Celsius and Fahrenheit) as a double I set declarations double for celsiusdegree; and fahrenheitdegree;
Somehow, compile identified two error on both row of JPanel.setBounds(xxx,xxx, variable, xx); because it is "incompatible types: possible lossy conversion from double to int."
When I tried to change the variable to int. The error is that the formula for celsiusdegree won't recognize int. So how do I make it work for double variables?