RFR: 8139208: [macosx] Issue with setExtendedState of JFrame [v2]
Alisen Chung
achung at openjdk.org
Mon Aug 14 21:04:10 UTC 2023
On Fri, 11 Aug 2023 04:50:55 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:
> @alisenchung
>
> An automated test can be created by adding Component Listener to the reproducer test in JBS. The following code throws Runtime Exception if the frame was visible at the original size of 200 x 200 before it was maximized.
>
> ```
> frame.addComponentListener(new ComponentAdapter() {
> @Override
> public void componentResized(ComponentEvent e) {
> if (e.getComponent().getSize().equals(new Dimension(200, 200))) {
> throw new RuntimeException("Test Failed! " +
> "Original Frame size was visible before maximizing");
> }
> }
> });
> ```
When I run the test manually after the change I'm not able to see a small window anymore. Won't this code always fail since you listen for a resize event then check the size of the window right before the window is resized?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15236#issuecomment-1678054394
More information about the client-libs-dev
mailing list