What if i call whatever is being called when the JFrame is minimized and maximized or moved to another screen? Anyone know whats being called there?
Not sure what you mean here.
I just mean that moving the JFrame to another screen seems to fix the freeze. So if i manually call the methods invoked during a drag to a new screen at the end of the constructor. Wont this fix it?
Have you tried scaling back to a smaller number of objects/images to see if that helps and then gradually adding things back to see where the problems are?
Yup ive tried this. Doesn't matter if im loading 200 or 5. It freezes randomly sometimes no matter what the image load amount.
If you're doing a lot of image loading, be sure you're closing streams properly too.
The images are loaded at the first screen in some model objects. Only get the freeze error when i login to the app and go to the user area where the images are then resized.
I cant post all of the code here for the jPanel because its around 600 lines but heres whats being called in the constructor.
1. SetUp Basic instance variables
2. get images needed from model objects and resize them
3. initComponents method with default images and text
4. set all of the resized images onto the gui.
5. resize jframe and set its normal settings.
using netbeans.
Trying to implement a swing worker thread to handle the image resizing to see if this solves the problem. Do i put items 3, 4 and 5 in the done() method?