Hello experts,
I work on a UI java application composed from:
- top header
- left menu
- header text
- error message (displayed on the page's header)
- center container (JPanel) which is changed dinamically, in dependence of selected menu item (from left side)
When there are any computation errors, an error message is displayed on the application's header (location in the page's header).Error messages can be different, ones are composed from one row, but others are longer (2,3 rows)
When a long error appears, it may be displayed correctly or not (the message is displayed over other components). As far as I know, on changing UI components the doLayout(), repaint() methods are invoked indepenendly and these should correct the layout.
Recently I read about EDT and noticed that a swing application should be organised according to EDT principles.
I think that this will solve my problem, because all the operations will be synchronized and I'll manage the method calls' consecutivity.
But now, I don't have enough time to refactor the application and this is scheduled for next release.
Do you know another solution which will help in adjusting layouts? This problem is very tricky, I'm not able to reproduce it. But it appears from time to time.
Thanks a lot. Sergiu
PS: If you have any questions or more details are needed, please don't hesitate to contact me.