My Run Method Does Not Work Witn Changing JLabel Images From The Other Class?
I guess the title says most of it. What I am trying to do is changing a JLabels icon to another using only another classes public stuff. (Both images, JLabels). In order to do this I am using this piece of code (Note, this is in a class which implements Runnable, so this is into the run(); method):
Code:
Thread.sleep(1000);
Engine Eng = new Engine();
Eng.Grid[1][1].setIcon(Eng.Sprite[0])
Why is it not working? Any soloution, please help!