[SWINGX-1398] Safegaurd JXPanel painting against improper subclassing Created: 02/Mar/11 Updated: 04/Mar/11 Resolved: 02/Mar/11
|Reporter:||Karl Schaefer||Assignee:||Karl Schaefer|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
We assume that JXPanel is a container and has no foreground. Some people incorrectly subclass J(X)Panel to create custom components with UI delegates. In such cases, those users could be painting a foreground in the UI delegate. Our background painter would actually paint over their foreground painting.
Even though I would consider it an implementation bug on the users' part to do such a thing, we cannot prevent against such stupidity, but we can safe guard against it. We can call getUI().paint after we paint the background painter. This extra call will do nothing in core UI delegates (other than add the overhead of an unnecessary call), but it will show foreground in these poorly-designed components.
|Comment by Karl Schaefer [ 02/Mar/11 ]|
Issue 1398: Add a call to getUI().paint to safeguard against improper subclassing of JXPanel for custom components.
Committed revision 3930.