Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please backport JDK-8215396: JTabbedPane preferred size calculation is wrong for SCROLL_TAB_LAYOUT #63

Closed
mperktold opened this issue Dec 11, 2019 · 5 comments
Milestone

Comments

@mperktold
Copy link

We would like to use JDK 11 in production, but we think that JDK-8215396 might disturb our users. The problem was fixed in JDK 13 but not backported, therefore please backport it to JDK 11.

Appologies if this is the wrong place to open such a request.
I tried requesting this at https://bugs.java.com/bugdatabase/, but I didn't get any reaction so far, so I'm trying it here.
Also, if you can point me to a better place for requesting backports, please do so.

@cliveverghese
Copy link
Contributor

cliveverghese commented Dec 12, 2019

Hi @mperktold,

Thank you for your feedback.
We have evaluated the bug you mentioned and it seems that the patch applies cleanly to JDK11. We will work on backporting this to Corretto and OpenJDK11.

While we are working on backporting this issue, can you tell us about your use case and the failure you are seeing? Are you currently using the workaround mentioned in the JBS Bug?

@mperktold
Copy link
Author

Thanks @cliveverghese,

We didn't find a satisfactory workaround.

As for the problem itself, please see the following two screenshots showing the JFrames produced by the program provided in the original bug:

SCROLL_TAB_LAYOUT:
grafik

WRAP_TAB_LAYOUT:
grafik

They should look identical, but the one using SCROLL_TAB_LAYOUT is too small.

In our real app this causes some layout problems.

For instance, when data forms are embedded in a JTabbedPane using SCROLL_TAB_LAYOUT, the last row is too small.
See the following example of three stacked text fields:
grafik

Of course, the actual behavior depends on the LayoutManager used for the tab content, but the root of the problem is the wrong calculation of minimum and preferred size.

@mperktold
Copy link
Author

Thanks!

Although I am pretty confident this will work as expected, could you please tell me how I can get a snapshot build of Corretto 11 in order to test this?

@davecurrie
Copy link
Contributor

@mperktold We don't yet have snapshot builds of Corretto but you should be able to clone the repo to build and verify.

@mperktold
Copy link
Author

I wasn't able to build a snapshot myself, but in the meantime, 11.0.6 was released, and I could verify the backport works. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants