Discussion:
[Bug 1770278] [NEW] Swing applications look strange with OpenJDK-11
(too old to reply)
Martin Weißhaupt
2018-05-09 22:21:48 UTC
Permalink
Public bug reported:

I have noticed that NetBeans looks strange with OpenJDK 11. It seems to
use GTK3 widgets are used which have a different padding than GTK2
widgets.

The screenshots show NetBeans 8.2 running on JDK9 and NetBeans 9-Dev
running on OpenJDK 11 but it doesn't matter which application or version
is used.

Switching to JDK8 or JDK9 or using the Metal look and feel or Nimbus look and feel also fixes the issue.
Also starting NetBeans with Oracle JDK 11 does not have any drawing issue.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: openjdk-11-jdk 10.0.1+10-3ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
Uname: Linux 4.15.0-20-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: GNOME
Date: Thu May 10 00:09:07 2018
InstallationDate: Installed on 2016-10-25 (561 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=de_DE.UTF-8
SHELL=/bin/bash
SourcePackage: openjdk-lts
UpgradeStatus: Upgraded to bionic on 2018-04-24 (15 days ago)

** Affects: openjdk-lts (Ubuntu)
Importance: Undecided
Status: New


** Tags: amd64 apport-bug bionic wayland-session

** Attachment added: "NetBeans looks good on JDK9"
Loading Image...
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770278

Title:
Swing applications look strange with OpenJDK-11

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-lts/+bug/1770278/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/
Martin Weißhaupt
2018-05-09 22:23:13 UTC
Permalink
** Attachment added: "NetBeans has multiple display issues with OpenJDK 11"
Loading Image...
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770278

Title:
Swing applications look strange with OpenJDK-11

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-lts/+bug/1770278/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubun
Tiago Stürmer Daitx
2018-05-18 17:19:09 UTC
Permalink
I have reported it under https://bugreport.java.com and got the bug
number 9053855 - it is now under review by Oracle, I will update it here
when they make the report public.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770278

Title:
Swing applications look strange with OpenJDK-11

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-lts/+bug/1770278/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.c
Tiago Stürmer Daitx
2018-05-17 21:09:31 UTC
Permalink
Thank you for taking the time to report this bug and helping to make
Ubuntu better.

Could you please try adding -Djdk.gtk.version=3 to the java command line
to check if it solves the problems and then reporting back?

If it does help then the issue might be solved by backporting
https://bugs.openjdk.java.net/browse/JDK-8198649.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770278

Title:
Swing applications look strange with OpenJDK-11

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-lts/+bug/1770278/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://list
Tiago Stürmer Daitx
2018-05-18 13:49:54 UTC
Permalink
Thanks for the feedback. Indeed, Ubuntu's (and Debian's) OpenJDK
actually applies the patch from JDK-8198649 in order to enable GTK3 by
default in OpenJDK 10, while upstream that has only applied that to
OpenJDK 11 which has not yet been released.

That's why Oracle's JDK 10 works fine unless you set the
-Djdk.gtk.version=3: they still default to gtk2 when both are installed.

I'll be looking into this later in the day and will report it upstream
if needed - OpenJDK 11 is in Early Release, so there aren't a lot of
users trying it yet.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770278

Title:
Swing applications look strange with OpenJDK-11

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-lts/+bug/1770278/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailm
Martin Weißhaupt
2018-05-18 09:54:51 UTC
Permalink
Sorry I got confused about version 11 and 10. I meant Oracle JDK 10.
This release does not have the issue unless I add -Djdk.gtk.version=3 on
command line.

I also noticed that the issue goes away if I start NetBeans and other
applications on OpenJDK-11 (which is actually version 10 on Ubuntu) with
this flag: -Djdk.gtk.version=2

It seems that this issue occurs because of the padding used in GTK3
widgets. A quick fix would be to set GTK2 as default for now but what
happens when GTK2 will be phased out?
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770278

Title:
Swing applications look strange with OpenJDK-11

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-lts/+bug/1770278/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https:
Bug Watch Updater
2018-05-17 21:52:59 UTC
Permalink
** Changed in: openjdk-10 (Debian)
Status: Unknown => New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770278

Title:
Swing applications look strange with OpenJDK-11

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-lts/+bug/1770278/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-b
Tiago Stürmer Daitx
2018-05-17 21:14:42 UTC
Permalink
Post by Martin Weißhaupt
Also starting NetBeans with Oracle JDK 11 does not have any drawing issue.
What about Oracle's JDK 10, is it fixed there? It would be a better comparison than JDK 11.

Reasoning: although our package is named openjdk-11 it is actually
running openjdk-10 (thus the 10.0.1+10-3ubuntu1 version). It might seem
misleading, but that is in place so we can make the upgrade path to our
users easier when OpenJDK 11 gets released in September this year.

** Changed in: openjdk-lts (Ubuntu)
Status: New => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770278

Title:
Swing applications look strange with OpenJDK-11

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-lts/+bug/1770278/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.
Tiago Stürmer Daitx
2018-05-17 20:51:24 UTC
Permalink
** Bug watch added: Debian Bug tracker #897629
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897629

** Also affects: openjdk-10 (Debian) via
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897629
Importance: Unknown
Status: Unknown
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1770278

Title:
Swing applications look strange with OpenJDK-11

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-lts/+bug/1770278/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-***@lists.ubuntu.com
https://lists.ubuntu.com/mailma
Loading...