I am getting an error because of the following line of code:
int x = color(Integer.parseInt("ffffffde",16));
I think it might be because it is a minus value
Any ideas why or how or how to fix it?
EDIT:
Sorry, didn't include the actual error. here it is:
Exception in thread "Animation Thread" java.lang.NumberFormatException: For input string: "ffffffde" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source)
EDIT 2:
The value ("ffffffde") is being created by the following code:
Integer.toHexString(int_val);
EDIT 3: Turns out it is a known bug (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4215269) Although you can convert integers to hex strings, you cannot convert them back if they are negative numbers!!