Re: [cp-patches] FYI: Prevent multiple lines in JTextField

2005-11-15 Thread Meskauskas Audrius
Yes, your suggestion is the better way to fix that bug. Roman Kennke wrote: Hi again, The simplest way to reach the identical behaviour is to override setText and replaceSelection, replacing (if present) line feeds and carriage returns by spaces. I have looked into this. The simple

Re: [cp-patches] FYI: Prevent multiple lines in JTextField

2005-11-15 Thread Roman Kennke
Hi again, > The simplest way to reach the identical behaviour is to override setText > and replaceSelection, replacing (if present) line feeds and carriage > returns by spaces. I have looked into this. The simplest way is to do it in PlainDocument.insertString(), exactly where I implemented thi

Re: [cp-patches] FYI: Prevent multiple lines in JTextField

2005-11-15 Thread Roman Kennke
Am Dienstag, den 15.11.2005, 11:27 +0100 schrieb Meskauskas Audrius: > JTextField is always a single line component. In GNU Classpath, it is > possible to make it multi line by setting or pasting the line with line > feeds. While this is highly impressive, the Sun's implementation never > does t

[cp-patches] FYI: Prevent multiple lines in JTextField

2005-11-15 Thread Meskauskas Audrius
JTextField is always a single line component. In GNU Classpath, it is possible to make it multi line by setting or pasting the line with line feeds. While this is highly impressive, the Sun's implementation never does this, replacing the line feeds by spaces instead. The unwanted resizing of th