JDK-4028562 : AWT need way to dynamically detect Frame resizing.
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1997-01-28
  • Updated: 1999-12-14
  • Resolved: 1999-12-14
Related Reports
Duplicate :  
Description

Name: mc57594			Date: 01/28/97


I'm in the middle of writing a java source code editor in
java. The TextArea component is not applicable as it does not support
syntax coloring etc. 
I need a way to repair the drawing surface and reposition other
components as the user resizes the frame. Currently the
Component.COMPONENT_RESIZED event only occurs when the user has finished
the resize operation. The current situation is not something you would
want to give to the public. During a resize the document and associated
components (scrollbars etc) hang where they were. The exposed areas of
the Frame are now blank. When the user releases the mouse button
everthing snaps back into place. The fiction that the user is viewing a
seemless document is completely lost.
I have tried a number of workarounds:
1. During the resize operation getSize() retains its old value - its new
value is not set until the end of the operation. Dead end.
2. Frame.paint() is called during an sizing increase. In this case
getGraphics().getWidth/getHeight() do return the instantaneous size of
the Frame. Halleluya! However, paint() methods are not called for a
decrease in size as no paint repairs are necessary(bummer!).

What is needed is possibly an expansion of the WindowListener interface
to include WindowResizing(WindowEvent) or that the COMPONENT_RESIZED be
called more frequently during a resize.
======================================================================

Comments
WORK AROUND Name: mc57594 Date: 01/28/97 none that I can think of. ======================================================================
11-06-2004

EVALUATION Developer wants to receive the Component.COMPONENT_RESIZED as the component is being resized. creighton.chong@eng 1997-12-07
07-12-1997