I developed a somewhat simple GUI in Java Swing, and for some reason I am seeing some spooky behaviour.
On one computer when the swing window is open on the laptop's own screen it looks normal, but when moved to the second screen it turns completely black, even when it is partly in one and partly in the other it is shown correctly on the laptop screen and black on the other.
I can not reproduce it on my own computer (even though I have three screens), so I wanted to ask if anyone else has had similar experiences.
One idea to a reason could be that the laptop and second screen has different color depths, and that is messing with it.
Any pointers as to why it happens and a solution would be most welcome.
I just witnessed the same behavior when trying to use Freemind on my secondary monitor. A quick Google seems to indicate that it's a Java bug.
More context :
JRE 1.8.0_121 (latest version)
Windows 10
the bug happens whether the second monitor is configured on the left or on the right of the primary monitor (so probably not an issue with negative screen coordinates)
the really spooky part is that FreeMind displays properly if I drag the window to the secondary monitor slowly enough so maybe there's an issue linked to refresh rates.
the issue may be linked to the zoom factor set up on each monitor (125% on my primary vs 100% on my secondary) as the window visibly resizes when I move it from one monitor to the other
Hope this helps.
NB: this should be a comment rather than an answer, but I don't have enough reputation points yet ;)
Edit April 2018 :
For those still stumbling on this: on the same PC, the bug has disappeared after some software updates. I'm now running JRE 1.8.0_144, Windows 10 Pro 1709 (build 16299.371). My best bet is that a Windows update fixed the issue; window resizing and zoom factors now work much better than a year ago for legacy/Java applications (JMeter, Gimp).
I met this issue with apache-jmeter-r1839892 (nightly build of jmeter 5), my environment information is like below:
JRE 1.8.0_101 32bit
windows 10, Version 1607 build 14393.1944.
Inter(R) HD Graphics 530
NVIDIA Quadro M1000M
After I upgrade to JDK 10.0.2 64bit, then it works.
The root cause for me is most likely mentioned:
http://www.drastic.tv/support-59/supporttipstechnical/66-javaondualmonitors
Below solution mentioned in above link works as well with JRE 1.8.0_101 32bit
Start->Control Panel->System
Click the Advanced Tab
Click the Environment Variables button
Click the New button
For Variable name: _JAVA_OPTIONS
For Variable value: -Dsun.java2d.d3d=false
I also found another workaround: open jmeter, set the 2nd monitor as the main display in Windows and then switch back the 1st monitor as the main display.
I also tried to upgrade to JDK 1.8.0_181 64bit, the issue persists.
Related
After an update my Eclipse Oxygen picked white for a cursor color, which makes it almost invisible. So, instead of doing my work, I'm spending a Monday morning trying to get it back to normal - black, that is.
There are possible workarounds, like making the line background color darker, but I want to fix in a regular way.
I'm using CentOS 7.3 + Gnome. OS was also recently updated, and there were changes to the appearance. So I'm not sure, is it about OS or Eclipse. Tagging both.
Have someone had the same issue and fixed it?
I first tried to reproduce the issue on a VM. It worked fine, thus narrowing the problem to specific hardware and drivers.
Solved it by installing the vendors graphic card driver (NVIDIA), replacing nouveau. There is a bunch of pages describing the process, here is one:
http://www.advancedclustering.com/act_kb/installing-nvidia-drivers-rhel-centos-7/
So, it is not really a Stackoverflow question. If only I knew beforehand :).
Short history of problem:
After upgrading to Ubuntu 15.10 I had some problems with any Qt-apps after durable work with IntellijIDEA. In apps like tortoisehg I saw painting problems, like not filled areas or shifted text. It was fixed after reading post in archlinux forum. Just set up property for Qt and changed my openjdk to oracle's.
The next story, that possibly is relative to first, consists in my work in IntellijIDEA and other Java swing applications (like Netbeans RCP): after long term working some dialogs became transparent, were inaccessible or just clicked through it to something under. Reopen of the dialog or window helps, but my colleagues have same problems on other OS, like Fedora (with KDE).
This bug is annoying, because our product is written on Netbeans and works under *nix distributive. Sometimes we stuck with problem of click-through problem: dialog or window just clicked into window after it.
I think the problem in wrong settings of x-server and in Qt- and Java- toolkit clash. This leads to artifacts on both application groups.
Does anybody stuck with this problem and do you have some ideas to resolve it?
The possible reason is described in Russian here (https://toster.ru/q/267833?e=3090918#clarification_329784).
Some bugs of it are found in:
https://bugs.kde.org/show_bug.cgi?id=350976
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1512760
Summary: the Java and Qt applications use shmem that is never cleaned by Java, after some time Qt cannot use this memory to work right. Google it with words «Java Qt shmem».
I have recently started to notice that when clicking on some components like MenuItems in a MenuBar, or Choicebox that before they actually show up it takes about 2 seconds.
I would click on a choicebox and then wait 2 seconds before the choicebox items come up. This is also with components from third party libraries like ControlsFX.
The strange thing is that this is for ALL java applications that use JavaFX. Not just my application so a bug on my end is out of the question. I have tried uninstalling all java versions and installing a lower version to no avail.
My current java version is 1.8.0_45 (JDK) x64 on a Windows 8.1 Pro x64.
I am certain it is not my computer that is not performing well.
EDIT:
There is litterally nothing that I could find on this matter. I tried asking the Java Community on their website but my post got deleted for an unspecified reason.
EDIT 2:
After some research I have noticed that java puts error entries in the windows event logbook http://prntscr.com/6vnlww (sorry it's in dutch) and please look below in the comments for a ProcMon dump of everything that happened between me clicking on a choicebox in java and the choicebox opening up the item choices.
I have a Java 7 application which is using Java Chromium Embedded Framework to draw html/css into two windows it launches. This works quite well in 4 of 5 PCs that I've run it on. In one case there are alignment issues with the rendered html. Successful runs include Windows 7/8/8.1. Unsuccessful run is 8.1 on an HP TouchSmart Envy, straight out of the box. Perhaps the only distinguishable differences are that this PC is new and that it has a touch screen.
As you can see, the content is shifted upward while being additionally clipped at the right and bottom sides. This is true of both windows that the application opens. What's even stranger is that mouse events (such as the :hover effects on the buttons and click events) are received in their correct position -- clicking about two inches below "Start Presentation" fires the button's click event.
Frankly, I have no idea what to try next on this. I've tried installing and uninstalling graphics-related software, adjusting the screen resolution, adding and removing the second screen, restarting the pc, and updating the onboard graphics driver.
As I have no idea what else could be causing this inconsistency, any advice in troubleshooting this issue would be fantastic.
As it turns out, this appeared to be related to the way JCEF interacts with system drivers. Going through Windows Update for the first time, restarting, and returning to the device's native resolution solved this issue.
I have just started with Java and the first thing i did was to download the Java SE JDK 7u40 bundled with Netbeans.
I am on ubuntu 13.04.
When i tried out the samples from JavaFX on Netbeans specifically the Cube3D sample when i ran it strange results came out.I had an empty window with small yellow square on the top left of the window
rather than a 3d Cube on the window.
Similar problems occur with all the samples that have 3d in them.
However when i do this on windows enviroment everything runs properly (windows 7 to be precise).
Someone any reason of why is this happening?
I think this page contains the answer:
http://www.oracle.com/technetwork/java/javafx/downloads/supportedconfigurations-1506746.html
It states that: ...On Linux platforms, graphic hardware acceleration is only supported for Nvidia cards (proprietary drivers only).
Cheers.