install4j tooltip freezes when java 7 attached in mediaSets - java

In installer created with install4j when you move mouse over tooltip (for example radio-button tooltip), the installer freezes (hangs) for some time.
After long investigation I found (what is for me quite strange) that it is associated with attached java version. When in mediaSet I have java 6 everything works fine, as soon as I attach java 7 (windows-amd64-1.7.0_51) the installer hangs for the first time when I move mouse over any tooltip.
Any idea how to solve this?

Your thread dump shows that the AWT stalls in
sun.awt.Win32GraphicsDevice.isPixFmtSupported(int, int)
This seems to happen for some graphics cards. This is the bug in the JRE:
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6477756
It's targeted to be resolved in Java 9.
The workaround is to set the system property
-Dsun.awt.nopixfmt=true
for the installer.

Related

NetBeans right-click context menu flickers, disappears

Has anyone else had this issue? I've looked around and couldn't find anything substantial. It looks like this has been reported to NetBeans under various circumstances, but doesn't seem to be a general problem and doesn't seem to have been fixed.
I'm using a MacBook Pro with the Force Touch trackpad (the one with haptic feedback and force click), macOS Sierra, the latest version of NetBeans, and the latest JDK. Whenever I right click on pretty much anything (a file, an object in the GUI editor, etc.), the right-click context menu flickers for a fraction of a second and then disappears. It seems to be very random; sometimes if I keep right-clicking several times in a row, the menu stays put, but the amount of times I have to do this varies quite a bit, if it even works at all.
I've been able to narrow it down to clicking the trackpad with 2 fingers vs. tapping it with 2 fingers. It seems to work fine when I tap the trackpad, but there is a brief delay in the context menu appearing, which is mildly irritating. Clicking the trackpad makes the menu appear instantly, but is what causes this to happen.
My thinking is that the IDE thinks I'm trying to scroll (same 2-finger gesture) at the same time I'm trying to right-click, which is not what I'm trying to do.
I have no idea what caused this issue to happen. I've been using this setup for weeks with no issues, and it just started happening today. Reinstalling NetBeans and even reinstalling the operating system hasn't solved it (yeah, complete waste of time).
Has anyone else encountered something like this? I'm not sure how to fix it other than by tapping the trackpad instead of clicking it, which causes a slight delay in the menu appearing.
I've encountered this and had resorted to using a mouse (when possible) to avoid this problem.
A related JDK bug and root cause JDK bug describe the likely cause which is a precise scrolling introduced in Sierra that caused a fast scrolling in old applications including Java. Changes to fix this in the JDK combined with later Apple Sierra fixes introduced further issues that required additional JDK changes.
A related NetBeans bug points to a tweet that indicates the actual fix should be available in JDK 8u152 when it is released.
Updating to this version or later should resolve the issue.
See also: JDK 8u152 release notes and bug fixes that indicate the root cause bug JDK-8173876 fix is present.
I've also noticed the current Oracle JDK + Netbeans bundle is only at JDK 8u151. The Netbeans.org download site doesn't specify which JDK version is bundled in its Java variants.

focus-follows-mouse with [some] java applications doesn't behave as expected

Environment: Windows 7, JRE 8.65, observed with both yEd 3.14 and GanttProject 2.7.1 (also previously observed on Win XP.)
Can the program's main window take focus (not auto-raise) without being atop other windows and without clicking in it? (nothing found in 917 results from a StackOverflow search on the words "Java" "window" and "focus", though I was getting bleary-eyed by the end.)
The problem is that when I move the pointer into or across the program's window, that window does not activate, though it activates the icon in the "task bar" (which is auto-hidden.) It is clear that the program recognises the pointer's existence and focus change, but the main window never actually takes the pointer (i.e. the main window remains inactive, and requires that I click in it to activate it; which raises it, which is exactly the behaviour I try to avoid with F-F-M.)
This is more troublesome because when the icon in the task bar activates, the task bar covers a chunk of my screen and won't go away until the main program window is activated by clicking in it. Simply moving the mouse from one place to another on the screen has about a 30% probability of touching (and half-activating) one of these program windows, forcing me to locate the window, click in it, minimise it, then get back to what I really was trying to do. (Yes, my "desktop" is a jumble, but everything has its place and normally I can rapidly navigate among the dozen or so windows that are truly useful.)
Thanks for any pointers or advice. (Though suggestions that I change my behaviour probably won't be followed.)
This problem occurred to me as well. The only workaround I got so far is using JRE 6 if possible since this annoying behavior started with JRE 7.

Application not closing properly (Java Platform SE Binary won't close)

I've created a Java application and converted it to an .exe using Launch4j and it runs fine. But when it is closed, the "Java (TM) Platform SE Binary" task remains running in the Windows Task Manager. Each instance of the application I run creates a new task for this and they need to be manually end-tasked.
Any ideas why this would happen? I've only been coding in Java for about 3 weeks and this is my first application.
Hope it's ok to add links to the application + zipped source code. I can't add the source code directly as it is too long. Thanks for any advice or suggested solutions.
Application:
http://www.filedropper.com/folderencryptor
Source Code:
http://www.filedropper.com/folderencryptor_1
I forgot that my application opened another JFrame to display some options and I had not set any action to occur when the close button in the frame was pressed. By default, Java sets it to 'hide the frame' when closed(not helpful Java!!). So Java was still using the frame, and hence the Windows task was still running.
So all I had to do was add...
optFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE)
...inside the initialization code for the options JFrame. In short, don't forget to dispose of JFrames when you're done with them.

(Java 7) Swing application loses keyboard focus

My application is a GUI frontend for a database, and is built using Java's Swing library. The application is compiled using Java 5 (1.5).
When the application is ran using Java 7 I am able to write in textfields, comboboxes, etc. using the keyboard, until the data is loaded from the database then the cursor continues to blink but what I type is not typed on the screen. However, if I click on another windows e.g. my browser and then come back to my application, or minimize and maximize my application, the keyboard input works and behaves as normal.
When I run with Java 1.5 or 1.6, however this issue does not appear.Any insight on what might have changed in Java 1.7, and possibly a workaround?
PS: So far I made a workaround as follows:
frame.setFocusableWindowState(false);
frame.setFocusableWindowState(true);
However, I have this inside a timer, as I don't know where exactly the issue occurs. This is not really a proper solution...
Thanks

windows 7, some SWT dialogs are showed incomplete

I develop a RCP on windows XP, but when run on windows 7, some dialogs are showed incomplete. Usually, the widgets at the bottom of the dialog only show half, the other half were hidden because the dialog not big enough.
The problem happens on a win7, all the dialogs in my XP are displayed OK.
And I try to change resolution of XP and win7, At all resolution xp performs ok, but win7 failed.
I generated some dialogs of swt and jface, they are performs ok in XP, and incomplete in win7. \
Does anyone has some ideas? Thanks
All I can advise is to update your RCP to the newest version. SWT/JFace needed to be adapted to the specifics of Windows 7 UI, so if you are using an older version, it is bound to cause problems. To get any kind of advice more specific to your situation, it's not going to happen without a specific piece of your code that reproduces the phenomenon.

Categories

Resources