Morning,
I checked the code and I took the images from the project CheckBoxDemo (
Using Swing Components: Examples (The Java™ Tutorials > Creating a GUI with JFC/Swing > Using Swing Components)) and it works.
Just I would like to comment that I found 3 things when I put the code in Eclipse:
1. in this part I had an error:
...
Hashtable<Integer,JLabel> table = new Hashtable<Integer,JLabel>();
...
It display a Syntax error, parameterized types are only available if source level is 5.0.
I just changed by:
Hashtable table = new Hashtable();
2. In this line:
...
String s = String.format("%.2f", (j+4)/20.0);
...
and the message in Eclipse said:
The method format(String, Object[]) in the type String is not applicable for the arguments (String, double)
Here I wrote String s = "x"; instead.
I don't understand why method "format" does not work.
3. It has appeared a warning message in Eclipse when I tryed to do a debug, something about deprecated functions, and Eclipse gave me 3 options (Continue, Cancel and Restart), I chose Restart and now it works correctly. I tryed to put the original code in a new project to see the text message but I couldn't do it, this is rare. Anyway.
Thank you very much hardwired.
Now I would like to know how can I put an image with a dimension 2400 x 1800 like a thumbnail into this project. I will check that, however if you can help me with a reference please, I will apprecite it.
Thank you again.
Panchitopro