Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-02-25 Thread Prem Balakrishnan
; Ambarish Rapte; Rajeev Chamyal; swing-dev@openjdk.java.net Subject: Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns Hi, Prem. It seems that I was not clear in my previous email. Small clarification: Usually we can fix/change an existed code in a few

Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-02-25 Thread Sergey Bylokhov
Hi, Prem. It seems that I was not clear in my previous email. Small clarification: Usually we can fix/change an existed code in a few situations: 1 Behavior is changed if it contradicts the specification. 2 The specification is changed if it contradicts the long-term behavior 3 If some behavior

Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-01-22 Thread Alexander Scherbatiy
On 21/01/16 15:19, Andrej Golovnin wrote: Hi Perm, I'm sorry, my mistake. To see the difference you must run the example with JDK 8, e.g. without your patch. The example contains two fields "jdk8" and "jdk9". The "jdk9" field simulates the behaviour of JTextField with your patch. Both fields

Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-01-22 Thread Andrej Golovnin
Hi Alexandr, > Usually you are right that if there is a public javadoc and developers > relies on it, changing the API could break their programs. > > This case looks slightly different. The javadoc for > JTextField.getPreferredSize() contradicts to the parent > JComponent.getPreferredSize()

Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-01-21 Thread Prem Balakrishnan
] Sent: Thursday, January 21, 2016 1:21 PM To: Prem Balakrishnan Cc: Sergey Bylokhov; Alexander Scherbatiy; Ambarish Rapte; Rajeev Chamyal; swing-dev@openjdk.java.net Subject: Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns Hi all, as a long time Swing

Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-01-21 Thread Andrej Golovnin
Hi Perm, I'm sorry, my mistake. To see the difference you must run the example with JDK 8, e.g. without your patch. The example contains two fields "jdk8" and "jdk9". The "jdk9" field simulates the behaviour of JTextField with your patch. Both fields "jdk8" and "jdk9" should have the same size on

Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-01-21 Thread Andrej Golovnin
Hi all, as a long time Swing developer I want to vote against this change. This change may break the layout of existing applications and make them unusable. This code exists for very long time. And it should stay as is. The only change that you should make is to document the current behaviour.

Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-01-20 Thread Prem Balakrishnan
@openjdk.java.net Subject: Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns Hi, Prem. This change actually contradicts to the specification of JTextField. Check the specification: /** * Constructs a new JTextField that uses the given text * storage

Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-01-20 Thread Sergey Bylokhov
Hi, Prem. This change actually contradicts to the specification of JTextField. Check the specification: /** * Constructs a new JTextField that uses the given text * storage model and the given number of columns. * @param columns the number of columns to use to calculate

Re: Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-01-19 Thread Alexander Scherbatiy
On 18/01/16 14:46, Prem Balakrishnan wrote: Hi, Please review fix for JDK9, *Bug:*https://bugs.openjdk.java.net/browse/JDK-8146320 *Webrev:*http://cr.openjdk.java.net/~rchamyal/prem/8146320/webrev.00/ *Issue:* JTextField

Review Request for Bug 8146320 JTextField ignores setPreferredSize when having columns

2016-01-18 Thread Prem Balakrishnan
Hi, Please review fix for JDK9, Bug: https://bugs.openjdk.java.net/browse/JDK-8146320 Webrev: http://cr.openjdk.java.net/~rchamyal/prem/8146320/webrev.00/ Issue: JTextField ignores setPreferredSize when having columns Cause: JTextField setPreferredSize is not actually ignored ,