Forum Clubic

How i can save the reslut in jlabel

I have a problem in java code , please I want, help ;
I assign whith a button the result to a “JLabel” (each JLabel I assign a single result, the problem is that I can not save the result in the JLabel,
for example, when I assign the second result I find the first JLabel is empty

That’s a French board you’re on. Hopefully for you, we do speak the Evil English !

What do you mean by “Save” ? Do you mean you persist the information on some file ?
Could you provide us with some Java code ? (and beware, the board sucks at formatting Java code).

Sounds like the JLabel is being used as a class variable, as opposed to an instance variable. It has probably been declared “static” and that’s a mistake.
Edité le 16/07/2014 à 12:02