-
Notifications
You must be signed in to change notification settings - Fork 46
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
Externalize does not repaint frame #41
Comments
Swing is broken in Linux since about version 1.6. Not just Docking-Frames has repaint issues, any application that uses more than one frame has issues (we have a nice Swing application at my workplace that does not work properly on many different Linux computers). |
This is simply not true. I am using a great number of Swing based multi-window applications. It may be that there are bugs, but they are usually not consistent across OpenJDK 6, OpenJDK 7 and Oracle JDK 8. I am sure there are possible work-arounds. For example, is it possible to turn off the animation that creates the externalised frame? |
Making the dialog displayable by calling if( undecorated ){
dialog.setUndecorated( true );
dialog.getRootPane().setWindowDecorationStyle( JRootPane.NONE );
dialog.pack(); // N.B. required for Linux
} |
The second change necessary is calling private Listener() {
updateBorder();
} |
pack may be a bit dangerous, that could have unwanted side effects (like the size of the dialog not being the expected size). I'll try out your fixes, I'm really curious to see if these changes help on my system too (due to having a new computer I first need to reinstall my Ubuntu... could take a while). |
I double checked that the size is not initialised at that moment. If there is doubt, one may just paste the contents of Container parent = this.parent;
if (parent != null && parent.getPeer() == null) {
parent.addNotify();
}
if (peer == null) {
addNotify();
} |
I am seeing this problem both with 1.1.1 and latest snapshot and across different JVM (OpenJDK 6, OpenJDK 7, Oracle JDK 8) and look-and-feels (Motif, Metal, Native, ...), so assume it's a bug in docking-frames. I have a very simple layout with one single and one multi dock. If I try to externalise either frame, I just get a blank rectangle, the frame is not painted (neither border decoration nor content). I have to explicitly deactivate and reactive the window and then move it to have it fully painted.
The text was updated successfully, but these errors were encountered: