Skip to main content

JXLayer with Blur Effect Disables JTable keybinding

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
JewelBocks
Offline
Joined: 2011-03-12

I have a JXLayer over my JTable in combination with a glasspane.
this.blurLockableUI = new LockableUI();
this.blur = new BlurFilter();
this.effect = new BufferedImageOpEffect(this.blur);
this.blurLockableUI.setLockedEffects(this.effect);

this.layer = new JXLayer<JComponent>(this.mainPanel);
this.layer.setUI(this.blurLockableUI);
this.add(this.layer); /////// added to JInternalFrame

The layer is over a JInternalFrame. The blur effect works alright except when it is turned off, then table keybinding no longer works. I cannot navigate up or down columns using the UP or DOWN arrow keys. When tested with the glasspane visible and then made insvisible, keybinding continues to function correctly, so this problem is definately attributed to the JXLayer.

public void setBlurLockableState(boolean s) {
this.setGlassVisible(s);
if(s) {
if(this.layer.getUI() == null) {
this.layer.setUI(this.blurLockableUI);
}
this.blurLockableUI.setLocked(s);
} else {
this.blurLockableUI.setLocked(s);
this.layer.setUI(null);
}

}