<AWT Dev> JDK-8055197
Sebastian Sickelmann
sebastian.sickelmann at gmx.de
Sun Mar 15 21:12:01 UTC 2015
Hi,
searching for something easy and interessting to work on i discovered
JDK-8055197 which is maybe a "bug" or "just" a side effect of using
RICHEDIT_CLASS instead of EDIT. I think RICHEDIT_CLASS is introduced for
TextField because of JDK-7092551. And it "breaks" a strage behavior of
the TextField. With the TextField prior to Java7 you can set a text that
contains newlines. And you can edit the text (add chars before and after
the newline) and you can remove the newline by hitting delete or
backspace depending to your actual position of your cursor. While moving
the cursor your will find that the cursor pauses (you must press
cursor-right or cursor-left two times to jump over the newline) at the
newline.
But what ever you do, you cannot insert an new newline. Not by typing.
Not by copying. So i would argue that is is a minor discrepancy in the
win32 api for TEXT edit-Control.
I think we can emulate the old behavior from java6, but before i put
greater effort in this, i think we should discuss if JDK-8055197 is a
bug or if it is an descrepancy-fix, because TextField is a
singleline-control?
--
Sebastian
More information about the awt-dev
mailing list