Re: Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-23 Thread Semyon Sadetsky

Looks good to me.

--Semyon

On 2/24/2016 6:53 AM, Prem Balakrishnan wrote:


Reminder!

*From:*Prem Balakrishnan
*Sent:* Thursday, February 18, 2016 4:40 PM
*To:* Semyon Sadetsky; Rajeev Chamyal; Alexander Scherbatiy
*Cc:* Sergey Bylokhov; Ambarish Rapte; swing-dev@openjdk.java.net
*Subject:* RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify


 Hi Semyon,

Thanks for the review,

Test Updated as per review points

*Webrev:*http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.03/ 
<http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.03/>


Regards,

Prem

*From:*Semyon Sadetsky
*Sent:* Thursday, February 18, 2016 2:33 PM
*To:* Prem Balakrishnan; Rajeev Chamyal; Alexander Scherbatiy
*Cc:* Sergey Bylokhov; Ambarish Rapte; swing-dev@openjdk.java.net 
<mailto:swing-dev@openjdk.java.net>
*Subject:* Re:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify


Hi Prem,

In the test
getLocationOnScreen(),  getBounds() and getNormalBounds() should be 
called on EDT for Swing components.


--Semyon

On 2/15/2016 11:51 AM, Prem Balakrishnan wrote:

Hi Rajeev,

Test updated as per your comments.

*Webrev:*http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.02/ 
<http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.02/>

Regards,
Prem

*From:*Rajeev Chamyal
*Sent:* Monday, February 15, 2016 12:00 PM
*To:* Prem Balakrishnan
*Cc:* Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy;
Ambarish Rapte; swing-dev@openjdk.java.net
<mailto:swing-dev@openjdk.java.net>
    *Subject:* RE:  Review Request for 7126823 :
JInternalFrame.getNormalBounds() returns bad value after
iconify/deiconify

Hello Prem,

1)UI should be created in a swing thread so please update the
createUI method to use a swing thread.

2)Also please use SwingUtilities.invokeAndWait instead of
SwingUtilities.invokeLater.

Regards,

Rajeev Chamyal

*From:* Prem Balakrishnan
*Sent:* 11 February 2016 12:49
*To:* Rajeev Chamyal
*Cc:* Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy;
Ambarish Rapte; swing-dev@openjdk.java.net
<mailto:swing-dev@openjdk.java.net>
*Subject:* RE:  Review Request for 7126823 :
JInternalFrame.getNormalBounds() returns bad value after
iconify/deiconify

Hi Rajeev,

I have tested for all supported LAF’s across all
platforms(Windows, Linux and Mac)

Test updated for the same.

*Webrev:*
http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.01/
<http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.01/>

Regards,

Prem

*From:*Rajeev Chamyal
*Sent:* Wednesday, February 10, 2016 2:00 PM
*To:* Prem Balakrishnan
*Cc:* Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy;
Ambarish Rapte; swing-dev@openjdk.java.net
<mailto:swing-dev@openjdk.java.net>
*Subject:* RE:  Review Request for 7126823 :
    JInternalFrame.getNormalBounds() returns bad value after
iconify/deiconify

Hello Prem,

Did you test this fix for other LAF’s as well.

Regards,

Rajeev Chamyal

*From:* Prem Balakrishnan
*Sent:* 09 February 2016 14:40
*To:* Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy;
Ambarish Rapte; swing-dev@openjdk.java.net
<mailto:swing-dev@openjdk.java.net>; awt-...@openjdk.java.net
<mailto:awt-...@openjdk.java.net>
*Subject:*  Review Request for 7126823 :
    JInternalFrame.getNormalBounds() returns bad value after
iconify/deiconify

Hi*,*

Please review fix for JDK9,

*Bug: *https://bugs.openjdk.java.net/browse/JDK-7126823

*Webrev:*
http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/
<http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.00/>

*Issue:*

JInternalFrame.getNormalBounds() returns bad value after
iconify/deiconify

*Cause:*

Regression: due to 4424247: DefaultDesktopManager does not handle
InternalFrame state changes as expected.

https://bugs.openjdk.java.net/browse/JDK-4424247 related to
https://bugs.openjdk.java.net/browse/JDK-4900778

*Fix:*

DefaultDesktopManager.java

setNormalBounds(getBounds()); call removed from
iconifyFrame(JInternalFrame f) method.

*Justification:*

This fix is not breaking any of the previous fix i.e., related to
4424247 and 4900778.
(all previous scenarios are tested and validated with the current fix)

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL,

Hence no need to setNormaBounds externally.

public Rectangle getNormalBounds() {

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

  

Re: Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-23 Thread Prem Balakrishnan
Reminder!

 

From: Prem Balakrishnan 
Sent: Thursday, February 18, 2016 4:40 PM
To: Semyon Sadetsky; Rajeev Chamyal; Alexander Scherbatiy
Cc: Sergey Bylokhov; Ambarish Rapte; swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

 

 Hi Semyon,

 

Thanks for the review, 

Test Updated as per review points

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.03/

 

Regards,

Prem

 

 

From: Semyon Sadetsky 
Sent: Thursday, February 18, 2016 2:33 PM
To: Prem Balakrishnan; Rajeev Chamyal; Alexander Scherbatiy
Cc: Sergey Bylokhov; Ambarish Rapte; HYPERLINK 
"mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: Re:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi Prem,

In the test
getLocationOnScreen(),  getBounds() and getNormalBounds() should be called on 
EDT for Swing components.

--Semyon

On 2/15/2016 11:51 AM, Prem Balakrishnan wrote:

Hi Rajeev,

Test updated as per your comments.

 

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.02/

 

Regards,
Prem

 

 

From: Rajeev Chamyal 
Sent: Monday, February 15, 2016 12:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

1)  UI should be created in a swing thread so please update the createUI 
method to use a swing thread.

2)  Also please use SwingUtilities.invokeAndWait instead of 
SwingUtilities.invokeLater.

 

Regards,

Rajeev Chamyal

From: Prem Balakrishnan 
Sent: 11 February 2016 12:49
To: Rajeev Chamyal
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi Rajeev,

 

I have tested for all supported LAF's across all platforms(Windows, Linux and 
Mac)

Test updated for the same.

 

Webrev: HYPERLINK 
"http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.01/"http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.01/

 

Regards,

Prem

 

From: Rajeev Chamyal 
Sent: Wednesday, February 10, 2016 2:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

Did you test this fix for other LAF's as well.

 

Regards,

Rajeev Chamyal

 

From: Prem Balakrishnan 
Sent: 09 February 2016 14:40
To: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net; 
HYPERLINK "mailto:awt-...@openjdk.java.net"awt-...@openjdk.java.net
Subject:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi,

Please review fix for JDK9,

Bug: https://bugs.openjdk.java.net/browse/JDK-7126823

Webrev: HYPERLINK 
"http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.00/"http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/

 

 

Issue:

JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Cause:

Regression: due to 4424247: DefaultDesktopManager does not handle InternalFrame 
state changes as expected.

https://bugs.openjdk.java.net/browse/JDK-4424247 related to 
https://bugs.openjdk.java.net/browse/JDK-4900778 

 

Fix:

DefaultDesktopManager.java

setNormalBounds(getBounds()); call removed from iconifyFrame(JInternalFrame f) 
method.

 

Justification:

This fix is not breaking any of the previous fix i.e., related to 4424247 and 
4900778.
(all previous scenarios are tested and validated with the current fix)

 

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL, 

Hence no need to setNormaBounds externally.

 

public Rectangle getNormalBounds() {

 

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

 answer... Since normalBounds get set to null when the

 frame is restored, this should work better */

 

  if (normalBounds != null) {

  return normalBounds;

  } else {

return getBounds();

  }

}

 

 

As per Javadoc: 
public Rectangle getNormalBounds() 
If the JInternalFrame is not in maximized state, returns getBounds(); 
otherwise, returns the bounds t

Re: Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-18 Thread Prem Balakrishnan
 

 Hi Semyon,

 

Thanks for the review, 

Test Updated as per review points

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.03/

 

Regards,

Prem

 

 

From: Semyon Sadetsky 
Sent: Thursday, February 18, 2016 2:33 PM
To: Prem Balakrishnan; Rajeev Chamyal; Alexander Scherbatiy
Cc: Sergey Bylokhov; Ambarish Rapte; HYPERLINK 
"mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: Re:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi Prem,

In the test
getLocationOnScreen(),  getBounds() and getNormalBounds() should be called on 
EDT for Swing components.

--Semyon

On 2/15/2016 11:51 AM, Prem Balakrishnan wrote:

Hi Rajeev,

Test updated as per your comments.

 

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.02/

 

Regards,
Prem

 

 

From: Rajeev Chamyal 
Sent: Monday, February 15, 2016 12:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

1)  UI should be created in a swing thread so please update the createUI 
method to use a swing thread.

2)  Also please use SwingUtilities.invokeAndWait instead of 
SwingUtilities.invokeLater.

 

Regards,

Rajeev Chamyal

From: Prem Balakrishnan 
Sent: 11 February 2016 12:49
To: Rajeev Chamyal
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi Rajeev,

 

I have tested for all supported LAF's across all platforms(Windows, Linux and 
Mac)

Test updated for the same.

 

Webrev: HYPERLINK 
"http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.01/"http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.01/

 

Regards,

Prem

 

From: Rajeev Chamyal 
Sent: Wednesday, February 10, 2016 2:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

Did you test this fix for other LAF's as well.

 

Regards,

Rajeev Chamyal

 

From: Prem Balakrishnan 
Sent: 09 February 2016 14:40
To: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net; 
HYPERLINK "mailto:awt-...@openjdk.java.net"awt-...@openjdk.java.net
Subject:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi,

Please review fix for JDK9,

Bug: https://bugs.openjdk.java.net/browse/JDK-7126823

Webrev: HYPERLINK 
"http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.00/"http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/

 

 

Issue:

JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Cause:

Regression: due to 4424247: DefaultDesktopManager does not handle InternalFrame 
state changes as expected.

https://bugs.openjdk.java.net/browse/JDK-4424247 related to 
https://bugs.openjdk.java.net/browse/JDK-4900778 

 

Fix:

DefaultDesktopManager.java

setNormalBounds(getBounds()); call removed from iconifyFrame(JInternalFrame f) 
method.

 

Justification:

This fix is not breaking any of the previous fix i.e., related to 4424247 and 
4900778.
(all previous scenarios are tested and validated with the current fix)

 

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL, 

Hence no need to setNormaBounds externally.

 

public Rectangle getNormalBounds() {

 

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

 answer... Since normalBounds get set to null when the

 frame is restored, this should work better */

 

  if (normalBounds != null) {

  return normalBounds;

  } else {

return getBounds();

  }

}

 

 

As per Javadoc: 
public Rectangle getNormalBounds() 
If the JInternalFrame is not in maximized state, returns getBounds(); 
otherwise, returns the bounds that the JInternalFrame would be restored to. 

In maximizeFrame() , normalBounds is set to a value which is not NULL, i.e., 
setNormalBounds(getBounds()); 
In minimizeFrame(), normalBounds is set to NULL, i.e., setNormalBounds(null); 
NormalBounds should NOT be set elsewhere.

 

Test:

Integrated test for current bug and regression.

 

Regards,
Prem

 

 


Re: Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-18 Thread Semyon Sadetsky

Hi Prem,

In the test
getLocationOnScreen(),  getBounds() and getNormalBounds() should be 
called on EDT for Swing components.


--Semyon

On 2/15/2016 11:51 AM, Prem Balakrishnan wrote:


Hi Rajeev,

Test updated as per your comments.

*Webrev:*http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.02/ 
<http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.02/>


Regards,
Prem

*From:*Rajeev Chamyal
*Sent:* Monday, February 15, 2016 12:00 PM
*To:* Prem Balakrishnan
*Cc:* Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish 
Rapte; swing-dev@openjdk.java.net
*Subject:* RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify


Hello Prem,

1)UI should be created in a swing thread so please update the createUI 
method to use a swing thread.


2)Also please use SwingUtilities.invokeAndWait instead of 
SwingUtilities.invokeLater.


Regards,

Rajeev Chamyal

*From:* Prem Balakrishnan
*Sent:* 11 February 2016 12:49
*To:* Rajeev Chamyal
*Cc:* Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish 
Rapte; swing-dev@openjdk.java.net <mailto:swing-dev@openjdk.java.net>
*Subject:* RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify


Hi Rajeev,

I have tested for all supported LAF’s across all platforms(Windows, 
Linux and Mac)


Test updated for the same.

*Webrev:* http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.01/ 
<http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.01/>


Regards,

Prem

*From:*Rajeev Chamyal
*Sent:* Wednesday, February 10, 2016 2:00 PM
*To:* Prem Balakrishnan
*Cc:* Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish 
Rapte; swing-dev@openjdk.java.net <mailto:swing-dev@openjdk.java.net>
*Subject:* RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify


Hello Prem,

Did you test this fix for other LAF’s as well.

Regards,

Rajeev Chamyal

*From:* Prem Balakrishnan
*Sent:* 09 February 2016 14:40
*To:* Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish 
Rapte; swing-dev@openjdk.java.net <mailto:swing-dev@openjdk.java.net>; 
awt-...@openjdk.java.net <mailto:awt-...@openjdk.java.net>
*Subject:*  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify


Hi*,*

Please review fix for JDK9,

*Bug: *https://bugs.openjdk.java.net/browse/JDK-7126823

*Webrev:* http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/ 
<http://cr.openjdk.java.net/%7Earapte/prem/7126823/webrev.00/>


*Issue:*

JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

*Cause:*

Regression: due to 4424247: DefaultDesktopManager does not handle 
InternalFrame state changes as expected.


https://bugs.openjdk.java.net/browse/JDK-4424247 related to 
https://bugs.openjdk.java.net/browse/JDK-4900778


*Fix:*

DefaultDesktopManager.java**

setNormalBounds(getBounds()); call removed from 
iconifyFrame(JInternalFrame f) method.


*Justification:*

This fix is not breaking any of the previous fix i.e., related to 
4424247 and 4900778.

(all previous scenarios are tested and validated with the current fix)

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL,

Hence no need to setNormaBounds externally.

public Rectangle getNormalBounds() {

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

 answer... Since normalBounds get set to null when the

 frame is restored, this should work better */

  if (normalBounds != null) {

  return normalBounds;

  } else {

return getBounds();

  }

}

As per Javadoc:
public Rectangle getNormalBounds()
If the JInternalFrame is not in maximized state, returns getBounds(); 
otherwise, returns the bounds that the JInternalFrame would be 
restored to.


In maximizeFrame() , normalBounds is set to a value which is not NULL, 
i.e., setNormalBounds(getBounds());
In minimizeFrame(), normalBounds is set to NULL, i.e., 
setNormalBounds(null);

NormalBounds should NOT be set elsewhere.

*Test:*

Integrated test for current bug and regression.

Regards,
Prem





Re: Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-17 Thread Prem Balakrishnan
Reminder

 

From: Rajeev Chamyal 
Sent: Monday, February 15, 2016 2:42 PM
To: Prem Balakrishnan; Alexander Scherbatiy
Cc: Sergey Bylokhov; Semyon Sadetsky; Ambarish Rapte; swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Looks good to me.

 

Regards,

Rajeev Chamyal

 

From: Prem Balakrishnan 
Sent: 15 February 2016 14:22
To: Rajeev Chamyal; Alexander Scherbatiy
Cc: Sergey Bylokhov; Semyon Sadetsky; Ambarish Rapte; HYPERLINK 
"mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi Rajeev,

Test updated as per your comments.

 

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.02/

 

Regards,
Prem

 

 

From: Rajeev Chamyal 
Sent: Monday, February 15, 2016 12:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

1)  UI should be created in a swing thread so please update the createUI 
method to use a swing thread.

2)  Also please use SwingUtilities.invokeAndWait instead of 
SwingUtilities.invokeLater.

 

Regards,

Rajeev Chamyal

From: Prem Balakrishnan 
Sent: 11 February 2016 12:49
To: Rajeev Chamyal
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi Rajeev,

 

I have tested for all supported LAF's across all platforms(Windows, Linux and 
Mac)

Test updated for the same.

 

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.01/

 

Regards,

Prem

 

From: Rajeev Chamyal 
Sent: Wednesday, February 10, 2016 2:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

Did you test this fix for other LAF's as well.

 

Regards,

Rajeev Chamyal

 

From: Prem Balakrishnan 
Sent: 09 February 2016 14:40
To: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net; 
HYPERLINK "mailto:awt-...@openjdk.java.net"awt-...@openjdk.java.net
Subject:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi,

Please review fix for JDK9,

Bug: https://bugs.openjdk.java.net/browse/JDK-7126823

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/

 

 

Issue:

JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Cause:

Regression: due to 4424247: DefaultDesktopManager does not handle InternalFrame 
state changes as expected.

https://bugs.openjdk.java.net/browse/JDK-4424247 related to 
https://bugs.openjdk.java.net/browse/JDK-4900778 

 

Fix:

DefaultDesktopManager.java

setNormalBounds(getBounds()); call removed from iconifyFrame(JInternalFrame f) 
method.

 

Justification:

This fix is not breaking any of the previous fix i.e., related to 4424247 and 
4900778.
(all previous scenarios are tested and validated with the current fix)

 

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL, 

Hence no need to setNormaBounds externally.

 

public Rectangle getNormalBounds() {

 

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

 answer... Since normalBounds get set to null when the

 frame is restored, this should work better */

 

  if (normalBounds != null) {

  return normalBounds;

  } else {

return getBounds();

  }

}

 

 

As per Javadoc: 
public Rectangle getNormalBounds() 
If the JInternalFrame is not in maximized state, returns getBounds(); 
otherwise, returns the bounds that the JInternalFrame would be restored to. 

In maximizeFrame() , normalBounds is set to a value which is not NULL, i.e., 
setNormalBounds(getBounds()); 
In minimizeFrame(), normalBounds is set to NULL, i.e., setNormalBounds(null); 
NormalBounds should NOT be set elsewhere.

 

Test:

Integrated test for current bug and regression.

 

Regards,
Prem

 


Re: Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-15 Thread Rajeev Chamyal
Looks good to me.

 

Regards,

Rajeev Chamyal

 

From: Prem Balakrishnan 
Sent: 15 February 2016 14:22
To: Rajeev Chamyal; Alexander Scherbatiy
Cc: Sergey Bylokhov; Semyon Sadetsky; Ambarish Rapte; swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi Rajeev,

Test updated as per your comments.

 

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.02/

 

Regards,
Prem

 

 

From: Rajeev Chamyal 
Sent: Monday, February 15, 2016 12:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

1)  UI should be created in a swing thread so please update the createUI 
method to use a swing thread.

2)  Also please use SwingUtilities.invokeAndWait instead of 
SwingUtilities.invokeLater.

 

Regards,

Rajeev Chamyal

From: Prem Balakrishnan 
Sent: 11 February 2016 12:49
To: Rajeev Chamyal
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi Rajeev,

 

I have tested for all supported LAF's across all platforms(Windows, Linux and 
Mac)

Test updated for the same.

 

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.01/

 

Regards,

Prem

 

From: Rajeev Chamyal 
Sent: Wednesday, February 10, 2016 2:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

Did you test this fix for other LAF's as well.

 

Regards,

Rajeev Chamyal

 

From: Prem Balakrishnan 
Sent: 09 February 2016 14:40
To: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net; 
HYPERLINK "mailto:awt-...@openjdk.java.net"awt-...@openjdk.java.net
Subject:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi,

Please review fix for JDK9,

Bug: https://bugs.openjdk.java.net/browse/JDK-7126823

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/

 

 

Issue:

JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Cause:

Regression: due to 4424247: DefaultDesktopManager does not handle InternalFrame 
state changes as expected.

https://bugs.openjdk.java.net/browse/JDK-4424247 related to 
https://bugs.openjdk.java.net/browse/JDK-4900778 

 

Fix:

DefaultDesktopManager.java

setNormalBounds(getBounds()); call removed from iconifyFrame(JInternalFrame f) 
method.

 

Justification:

This fix is not breaking any of the previous fix i.e., related to 4424247 and 
4900778.
(all previous scenarios are tested and validated with the current fix)

 

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL, 

Hence no need to setNormaBounds externally.

 

public Rectangle getNormalBounds() {

 

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

 answer... Since normalBounds get set to null when the

 frame is restored, this should work better */

 

  if (normalBounds != null) {

  return normalBounds;

  } else {

return getBounds();

  }

}

 

 

As per Javadoc: 
public Rectangle getNormalBounds() 
If the JInternalFrame is not in maximized state, returns getBounds(); 
otherwise, returns the bounds that the JInternalFrame would be restored to. 

In maximizeFrame() , normalBounds is set to a value which is not NULL, i.e., 
setNormalBounds(getBounds()); 
In minimizeFrame(), normalBounds is set to NULL, i.e., setNormalBounds(null); 
NormalBounds should NOT be set elsewhere.

 

Test:

Integrated test for current bug and regression.

 

Regards,
Prem

 


Re: Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-15 Thread Prem Balakrishnan
Hi Rajeev,

Test updated as per your comments.

 

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.02/

 

Regards,
Prem

 

 

From: Rajeev Chamyal 
Sent: Monday, February 15, 2016 12:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

1)  UI should be created in a swing thread so please update the createUI 
method to use a swing thread.

2)  Also please use SwingUtilities.invokeAndWait instead of 
SwingUtilities.invokeLater.

 

Regards,

Rajeev Chamyal

From: Prem Balakrishnan 
Sent: 11 February 2016 12:49
To: Rajeev Chamyal
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi Rajeev,

 

I have tested for all supported LAF's across all platforms(Windows, Linux and 
Mac)

Test updated for the same.

 

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.01/

 

Regards,

Prem

 

From: Rajeev Chamyal 
Sent: Wednesday, February 10, 2016 2:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

Did you test this fix for other LAF's as well.

 

Regards,

Rajeev Chamyal

 

From: Prem Balakrishnan 
Sent: 09 February 2016 14:40
To: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net; 
HYPERLINK "mailto:awt-...@openjdk.java.net"awt-...@openjdk.java.net
Subject:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi,

Please review fix for JDK9,

Bug: https://bugs.openjdk.java.net/browse/JDK-7126823

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/

 

 

Issue:

JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Cause:

Regression: due to 4424247: DefaultDesktopManager does not handle InternalFrame 
state changes as expected.

https://bugs.openjdk.java.net/browse/JDK-4424247 related to 
https://bugs.openjdk.java.net/browse/JDK-4900778 

 

Fix:

DefaultDesktopManager.java

setNormalBounds(getBounds()); call removed from iconifyFrame(JInternalFrame f) 
method.

 

Justification:

This fix is not breaking any of the previous fix i.e., related to 4424247 and 
4900778.
(all previous scenarios are tested and validated with the current fix)

 

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL, 

Hence no need to setNormaBounds externally.

 

public Rectangle getNormalBounds() {

 

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

 answer... Since normalBounds get set to null when the

 frame is restored, this should work better */

 

  if (normalBounds != null) {

  return normalBounds;

  } else {

return getBounds();

  }

}

 

 

As per Javadoc: 
public Rectangle getNormalBounds() 
If the JInternalFrame is not in maximized state, returns getBounds(); 
otherwise, returns the bounds that the JInternalFrame would be restored to. 

In maximizeFrame() , normalBounds is set to a value which is not NULL, i.e., 
setNormalBounds(getBounds()); 
In minimizeFrame(), normalBounds is set to NULL, i.e., setNormalBounds(null); 
NormalBounds should NOT be set elsewhere.

 

Test:

Integrated test for current bug and regression.

 

Regards,
Prem

 


Re: Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-14 Thread Rajeev Chamyal
Hello Prem,

 

1)  UI should be created in a swing thread so please update the createUI 
method to use a swing thread.

2)  Also please use SwingUtilities.invokeAndWait instead of 
SwingUtilities.invokeLater.

 

Regards,

Rajeev Chamyal

From: Prem Balakrishnan 
Sent: 11 February 2016 12:49
To: Rajeev Chamyal
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi Rajeev,

 

I have tested for all supported LAF's across all platforms(Windows, Linux and 
Mac)

Test updated for the same.

 

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.01/

 

Regards,

Prem

 

From: Rajeev Chamyal 
Sent: Wednesday, February 10, 2016 2:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

Did you test this fix for other LAF's as well.

 

Regards,

Rajeev Chamyal

 

From: Prem Balakrishnan 
Sent: 09 February 2016 14:40
To: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net; 
HYPERLINK "mailto:awt-...@openjdk.java.net"awt-...@openjdk.java.net
Subject:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi,

Please review fix for JDK9,

Bug: https://bugs.openjdk.java.net/browse/JDK-7126823

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/

 

 

Issue:

JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Cause:

Regression: due to 4424247: DefaultDesktopManager does not handle InternalFrame 
state changes as expected.

https://bugs.openjdk.java.net/browse/JDK-4424247 related to 
https://bugs.openjdk.java.net/browse/JDK-4900778 

 

Fix:

DefaultDesktopManager.java

setNormalBounds(getBounds()); call removed from iconifyFrame(JInternalFrame f) 
method.

 

Justification:

This fix is not breaking any of the previous fix i.e., related to 4424247 and 
4900778.
(all previous scenarios are tested and validated with the current fix)

 

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL, 

Hence no need to setNormaBounds externally.

 

public Rectangle getNormalBounds() {

 

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

 answer... Since normalBounds get set to null when the

 frame is restored, this should work better */

 

  if (normalBounds != null) {

  return normalBounds;

  } else {

return getBounds();

  }

}

 

 

As per Javadoc: 
public Rectangle getNormalBounds() 
If the JInternalFrame is not in maximized state, returns getBounds(); 
otherwise, returns the bounds that the JInternalFrame would be restored to. 

In maximizeFrame() , normalBounds is set to a value which is not NULL, i.e., 
setNormalBounds(getBounds()); 
In minimizeFrame(), normalBounds is set to NULL, i.e., setNormalBounds(null); 
NormalBounds should NOT be set elsewhere.

 

Test:

Integrated test for current bug and regression.

 

Regards,
Prem

 


Re: Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-10 Thread Prem Balakrishnan
Hi Rajeev,

 

I have tested for all supported LAF's across all platforms(Windows, Linux and 
Mac)

Test updated for the same.

 

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.01/

 

Regards,

Prem

 

From: Rajeev Chamyal 
Sent: Wednesday, February 10, 2016 2:00 PM
To: Prem Balakrishnan
Cc: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
swing-dev@openjdk.java.net
Subject: RE:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hello Prem,

 

Did you test this fix for other LAF's as well.

 

Regards,

Rajeev Chamyal

 

From: Prem Balakrishnan 
Sent: 09 February 2016 14:40
To: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
HYPERLINK "mailto:swing-dev@openjdk.java.net"swing-dev@openjdk.java.net; 
HYPERLINK "mailto:awt-...@openjdk.java.net"awt-...@openjdk.java.net
Subject:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi,

Please review fix for JDK9,

Bug: https://bugs.openjdk.java.net/browse/JDK-7126823

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/

 

 

Issue:

JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Cause:

Regression: due to 4424247: DefaultDesktopManager does not handle InternalFrame 
state changes as expected.

https://bugs.openjdk.java.net/browse/JDK-4424247 related to 
https://bugs.openjdk.java.net/browse/JDK-4900778 

 

Fix:

DefaultDesktopManager.java

setNormalBounds(getBounds()); call removed from iconifyFrame(JInternalFrame f) 
method.

 

Justification:

This fix is not breaking any of the previous fix i.e., related to 4424247 and 
4900778.
(all previous scenarios are tested and validated with the current fix)

 

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL, 

Hence no need to setNormaBounds externally.

 

public Rectangle getNormalBounds() {

 

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

 answer... Since normalBounds get set to null when the

 frame is restored, this should work better */

 

  if (normalBounds != null) {

  return normalBounds;

  } else {

return getBounds();

  }

}

 

 

As per Javadoc: 
public Rectangle getNormalBounds() 
If the JInternalFrame is not in maximized state, returns getBounds(); 
otherwise, returns the bounds that the JInternalFrame would be restored to. 

In maximizeFrame() , normalBounds is set to a value which is not NULL, i.e., 
setNormalBounds(getBounds()); 
In minimizeFrame(), normalBounds is set to NULL, i.e., setNormalBounds(null); 
NormalBounds should NOT be set elsewhere.

 

Test:

Integrated test for current bug and regression.

 

Regards,
Prem

 


Re: Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-10 Thread Rajeev Chamyal
Hello Prem,

 

Did you test this fix for other LAF's as well.

 

Regards,

Rajeev Chamyal

 

From: Prem Balakrishnan 
Sent: 09 February 2016 14:40
To: Sergey Bylokhov; Semyon Sadetsky; Alexander Scherbatiy; Ambarish Rapte; 
swing-dev@openjdk.java.net; awt-...@openjdk.java.net
Subject:  Review Request for 7126823 : 
JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Hi,

Please review fix for JDK9,

Bug: https://bugs.openjdk.java.net/browse/JDK-7126823

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/

 

 

Issue:

JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Cause:

Regression: due to 4424247: DefaultDesktopManager does not handle InternalFrame 
state changes as expected.

https://bugs.openjdk.java.net/browse/JDK-4424247 related to 
https://bugs.openjdk.java.net/browse/JDK-4900778 

 

Fix:

DefaultDesktopManager.java

setNormalBounds(getBounds()); call removed from iconifyFrame(JInternalFrame f) 
method.

 

Justification:

This fix is not breaking any of the previous fix i.e., related to 4424247 and 
4900778.
(all previous scenarios are tested and validated with the current fix)

 

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL, 

Hence no need to setNormaBounds externally.

 

public Rectangle getNormalBounds() {

 

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

 answer... Since normalBounds get set to null when the

 frame is restored, this should work better */

 

  if (normalBounds != null) {

  return normalBounds;

  } else {

return getBounds();

  }

}

 

 

As per Javadoc: 
public Rectangle getNormalBounds() 
If the JInternalFrame is not in maximized state, returns getBounds(); 
otherwise, returns the bounds that the JInternalFrame would be restored to. 

In maximizeFrame() , normalBounds is set to a value which is not NULL, i.e., 
setNormalBounds(getBounds()); 
In minimizeFrame(), normalBounds is set to NULL, i.e., setNormalBounds(null); 
NormalBounds should NOT be set elsewhere.

 

Test:

Integrated test for current bug and regression.

 

Regards,
Prem

 


Review Request for 7126823 : JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

2016-02-09 Thread Prem Balakrishnan
Hi,

Please review fix for JDK9,

Bug: https://bugs.openjdk.java.net/browse/JDK-7126823

Webrev: http://cr.openjdk.java.net/~arapte/prem/7126823/webrev.00/

 

 

Issue:

JInternalFrame.getNormalBounds() returns bad value after iconify/deiconify

 

Cause:

Regression: due to 4424247: DefaultDesktopManager does not handle InternalFrame 
state changes as expected.

https://bugs.openjdk.java.net/browse/JDK-4424247 related to 
https://bugs.openjdk.java.net/browse/JDK-4900778 

 

Fix:

DefaultDesktopManager.java

setNormalBounds(getBounds()); call removed from iconifyFrame(JInternalFrame f) 
method.

 

Justification:

This fix is not breaking any of the previous fix i.e., related to 4424247 and 
4900778.
(all previous scenarios are tested and validated with the current fix)

 

In JInternalFrame.java

getNormalBounds() returns getBounds() when normalBounds is NULL, 

Hence no need to setNormaBounds externally.

 

public Rectangle getNormalBounds() {

 

  /* we used to test (!isMaximum) here, but since this

 method is used by the property listener for the

 IS_MAXIMUM_PROPERTY, it ended up getting the wrong

 answer... Since normalBounds get set to null when the

 frame is restored, this should work better */

 

  if (normalBounds != null) {

  return normalBounds;

  } else {

return getBounds();

  }

}

 

 

As per Javadoc: 
public Rectangle getNormalBounds() 
If the JInternalFrame is not in maximized state, returns getBounds(); 
otherwise, returns the bounds that the JInternalFrame would be restored to. 

In maximizeFrame() , normalBounds is set to a value which is not NULL, i.e., 
setNormalBounds(getBounds()); 
In minimizeFrame(), normalBounds is set to NULL, i.e., setNormalBounds(null); 
NormalBounds should NOT be set elsewhere.

 

Test:

Integrated test for current bug and regression.

 

Regards,
Prem