I've a GUI program with a few frames(MainUI,2ndUI,3rdUI,4thUI). Each frames containing a few images(background image, buttons image, title image,etc..).
During the running of program, the UI seems sluggish at loading. Is there any ways that I can improve the efficiency of my java program?
While I was trying to solve this problem, I saw a few threads about Multi threading. However, I'm not confident if It could work in my program. Compared to the examples given by others, my program only responds to key press and will make changes to the UI accordingly.
Can anyone advice me please. [ July 25, 2007: Message edited by: Adrian Lee ]
In general, if the sluggishness is at loading I would try walking the datasets several times in the constructor.
Threads can be exciting as a solution to the problem you describe. David Eck has a website with several applets that run effectively, but then he holds a chair at a university teaching the stuff.
In general, the first place to look is whether you have put all the executing code in the paint methods - there are several names already and these tend to get trendy as times change and JDK's move forward, I am sure that by now putting exec code in paint methods will be depreciated rather than just changing some names around.
Another approach is just to use the latest releases of jdk and pre-written classes, I am sure the OO Board of the Saloon Wall will resonate this approach.