I have a bit of a weird problem. I have a swing application that has some windows with are built with JavaFX (Don't ask why I did this, I had to for due to project delivery time restrictions). The app is 50% Swing and 50% javaFx. Anyway what I found when I started deploying the application to customers is that some of the JavaFX JFXPanels that I am using don't display properly
To be more precise JFXPanels that I have in my main window, which are crested as the application starts, are showing fine. Other JFXPanels that I include in other windows that popup while using the application don't display correctly. The JFrame opens up but its empty of JavaFX components. The weird thing is the when I enable Java console (Java-settings -> Advanced -> Show console) everything is working fine.
The same problem I have in all operating systems I deployed the application. 32 and 64 bit.
also I am using JRE 7u25 in all machines.
Any clues anybody?
Maybe it's related to bug 8021381?
I appears to be fixed in Java 7u40-b38 according to the release notes
So I suggest to try out the Java 7u40 early access release (Download).
Related
I am making use of JavaFX's built in Alert and Dialog classes which work great in Windows and when running from Eclipse within Windows, but appear behind the parent window when running on my target hardware which is running RedHat 6. I have tried tweaking various things including:
primaryStage.initStyle(StageStyle.UNDECORATED);
primaryStage.setFullScreen(true);
alert.initOwner(primaryStage) and alert.initOwner(primaryStage.getOwner())
alert.initModality(Modality.WINDOW_MODAL) and alert.initModality(Modality.APPLICATION_MODAL)
alert.initStyle(StageStyle.***) with *** being all possible styles.
The only way I have been able to get the alerts and dialogs to remain on top is by calling alert.initStyle(StageStyle.UTILITY) however this creates a window with a cross button which I do not want. Ideally I would prefer a bordered window without additional buttons, or an undecorated window which I should then be able to style to achieve the bordered look.
I have read of similar issues in which using Windows doesn't work but Ubuntu does. I haven't been able to find any open issues or solutions in this case.
I am using Java 8 Update 77.
I have experienced a similar problem: Alerts would show perfectly well in front of the primary stage in Windows 10, yet behind the stage when running the program on Ubuntu. alert.initOwner(primaryStage) actually solved the problem for me.
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 a legacy Java application that uses Java 1.3
It works fine on windows Xp but now I need to make it run on windows 7.
I have installed the 1.3 jdk however when it first loads, the app won't render properly. Bits of the screen just show grey background, selecting buttons won't load a new screen etc.
I do know watching the output from the app it just purely graphics not rendering properly.
However if I press "Ctrl-alt-delete" and then just press "cancel" the software runs perfectly.
If I have a second monitor plugged in, it runs perfectly.
Has anyone got any suggestions how to make app run perfectly first time.
Thanks
Firstly, update your java, no excuses not to.
You can try the hack of resizing your component to a different size and then back again. I find this is the best way to make sure that swing doesn't do this sort of mischief with black squares here and there.
These things happen from time to time with non native tools for desktop development as opposed to those specifically designed for the targeted platform.
I am running a Java Swing application which is the presentation tier, business tier is Hessian Protocol exposing stateless session EJBs and backend tier is Sybase. I am getting a strange behavior as I am getting a black screen after launching my Swing application and clicking a button. I have upgraded my Java version from 1.7 to 1.8u51 and application server used is WildFly 8.2.0.
Swing application after launching if I click any button or icon, it gets hanged and black screen appears on the Java console. The issue is not occurring with 1.7 and it is only with 1.8u51 version.
Once I click the expand button, the table is shown in a different position. Is this something related to change in positioning of JTable in JDK 8 ? Please help me if any ideas.
Have anyone faced this strange behavior?
We have happily been deploying our cross-platform SWT app with Web Start for years. On the mac we had to switch from using -XStartOnFirst to using the com.apple.concurrent.Dispatch class to get SWT to run in the first thread.
Java 7 update 55 breaks our app again, and again it seems to be Web Start related.
The app starts and displays all windows, but all interface interactions don't have an effect until you click some other widget. For example, if I click a tab to bring it to foreground, I have to then click another widget to finally get the first action to fire. This is probably threading related, like most SWT/Web Start problems but I have no workaround for this problem other than stay away from 7u55. Has anybody experienced this problem and found a workaround?
EDIT: It seems the problem stems from our use of JNA, which we use to get the idle time from the OS using CGSSecondsSinceLastInputEvent. I get a NullPointerException in JNLPClassloader in the logs. If I comment out the code that uses JNA, the problem goes away. Since Oracle seems to be paranoid with security these last months, I'm guessing there is a problem with the jna jar. I sign all jars with the same cert, but maybe there is a new manifest attribute that I should be looking at. Anybody have any ideas?