Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4140634
Votes 1
Synopsis Wrong Rectangles used in DefaultTextUI.java - causes messy screen updating
Category java:classes_swing
Reported Against 1.1.5 , swing1.0.2
Release Fixed 1.2(swing1.1)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 4127974 , 4134102
Submit Date 20-MAY-1998
Description




Deleting characters using the Delete key in a JTextPane window leaves
garbage on the screen when the paragraph has wrapped lines.  Usually 
character fragments are left below the last wrapped line and on the right
of the paragraph.  Create a paragraph with three or four wrapped lines then
move the caret to the beginning and start hitting the delete key. The problem
should show up.  If not, set the margins on the JTextPane to something larger and
it should show up then.
(Review ID: 30834)
======================================================================
Work Around




This could be easily fixed by changing three lines of code in the
inner class 'UpdateHandler' within DefaultTextUI of JDK1.2 beta 4.
Instead of calling editor.getSize() in insertUpdate(),
removeUpdate(), and changedUpdate(), call getVisibleEditorRect()
so that the paint() rectangle, called in paintSafely(), will match 
the xxxUpdate() rectangles - both including the Insets of the JTextPane.
======================================================================
Evaluation
The described problem is exactly right.  The allocation being fed to 
insertUpdate, removeUpdate, and changeUpdate on the root view should 
have the components insets removed.  The DefaultTextUI code has been
moved to BasicTextUI in the plaf reorganization.
  xxxxx@xxxxx   1998-05-27
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang