-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Doesn't work with IBM (Eclipse OpenJ9) Java #851
Comments
Looks like a layout problem, not like a FlatLaf problem, because the look is equal in both screenshots... What happens if you resize the window in the second screenshot? |
Are there any exceptions? |
Sadly not no - I can connect to the windows app using a remote java application config and no exceptions are thrown - thats whats so frustrating ! |
Just a guess, but it might have something to do with the (native) window decorations, it looks like both the host application and the plugin are trying to manipulate the title-bar, the app-icon is also rotated compared to the other screenshots and the options menu is missing. Maybe you could give it a try without the window decorations. |
I think in your last screenshots FlatLaf is still probably trying to control the layout/style of the title bar (default behavior), i would try disabling the native window decorations of FlatLaf, I am not sure exactly whats the recommended way in the latest version, but you could try adding these lines immediately after your code where you set the FlatLaf look and feel:
|
And maybe also add:
|
Then I also have no idea whats going on.. But you can probably rule out now that it has to do with window decorations and turn them back on. Maybe you can find some way of debugging your plugin, if you can add logging to your code, for example printing the bounds of your components after layout is performed, it might help you to pinpoint the exact location in your code where things start to go wrong compared to the other look and feels. |
Well I zeroed in on it - I still havent figured out why this is an issue but ..
This caused the issue (the first tjhing buildGui does is set the look and feel. buildGui(); fixed it |
If the host application is also eclipse based it might be interesting to search for info about mixing swt and swing (awt). Your |
The original application is a C++ based app and this is the first time applying any kind of LAF has caused this issue. Thanks for all the replies so far guys ! |
If FlatLaf fails to load a native library it outputs a log (using java.util.logging.Logger). FlatLaf/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeLibrary.java Lines 109 to 111 in 72a4c00
Strange, tried FlatLaf Demo with OpenJ9 17 and it works without problems 😕 Why are you using Better use I've no idea what's going wrong when running on EDT... |
The error in the log and the JOptionPane and JToolTip problems are probably caused by incomplete UI defaults. Please try following on EDT, save the output to a file and post it here: Rhapsody10BasicIBM.setup();
UIManager.getLookAndFeelDefaults().entrySet().stream()
.sorted( (key1, key2) -> {
return String.valueOf( key1 ).compareTo( String.valueOf( key2 ) );
} )
.forEach( entry -> {
Object key = entry.getKey();
Object value = entry.getValue();
System.out.printf( "%-30s %s\n", String.valueOf( key ), String.valueOf( value ) );
} ); |
Thank you so much for looking into this ! |
@DevCharly Sorry to bug you - did you get a chance to look into the logs ? |
Loving this project but if anyone has any ideas how to solve this I'd really appreciate it !
If i run my app from Eclipse it works but if I build my app as a JAR file (and that isnt executable - it gets loaded by another Windows application that supports 'plugins') - it doesnt work - the app works but the layout is all screwed up - for example:
This is what the app looks like when run from Eclipse:
This is the same app when launched from the Windows application that loads it as a plugin:
I tried extracting the dlls in case that was the issue - but it didnt help (RhapsodyPowerpackPlugin.jar is the app that the Windows application loads) - if there are other required libraries like (for example MigLayout) those work fine so its something specific to FlatLaf
This is the ANT Script that builds it:
The text was updated successfully, but these errors were encountered: