JDK-4221190 : Frame back ground being erased with default color , What if we don't need erase
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1.8
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1999-03-17
  • Updated: 2001-11-20
  • Resolved: 2001-11-20
Related Reports
Relates :  
Description

Name: dbT83986			Date: 03/17/99


I would not say this is a problem. But major improvement in AWT.

Peer implementation of window in windows has background being painted with default color. As per my understanding windows 
DK has message called WM_ERASEBKGND which erases with specified back ground color and it will send a paint message for
the window. Because of this reason entire window gets validated and needs to be repainted. If user can have option to have
whether to erase back ground or to just to paint over will increase performance.  

We are writing a considerably huge application which has lot of (light weight)windows, when any other window is moved over or
this frame is resized we see the back ground being erased and repainted.

I have worked with Win SDK , I do know that by blocking WM_ERASEBKGND and managing properly would increase performance
of painting. This will also improve performance on JDesktopPane which is very solve in moving JInternalFrame's right now.
(Review ID: 55679)
======================================================================

Comments
EVALUATION I think "major" improvement is an overstatement, but it has some merit. We can get some of this benefit by coalescing paint and update events where possible (see 4223638, and some of the related bugs and rfes). eric.hawkes@eng 2000-03-09 I'm not exactly sure how to do this in Motif, but it may be worth investigating. However, I don't know how many people want this behavior - it doesn't seem to be standard on applications I have used, and there hasn't been a single JDC vote for this in two years. eric.hawkes@eng 2001-03-22 Use "-Dsun.awt.noerasebackground=true" with Merlin 1.4 (RC1 or later) and the Win32 AWT will not erase the background. Not available on Solaris or Linux. Since this flag is available I am closing this out as not reproducable. ###@###.### 2001-11-19
19-11-2001

WORK AROUND Name: dbT83986 Date: 03/17/99 I don't have access AWT peer source. But I can prove this by writing Win32 SDK program and code which plays with WM_ERASEBKGND . ====================================================================== Perhaps overriding update() to call paint() would do what the submitter wants. public void update(Graphics g) { paint(g); } eric.hawkes@eng 2001-04-08
08-04-2001