Skip to content
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

JTabFrame custom PanelPopup buttons disappear after changing LaF settings #337

Open
loerting opened this issue Jun 9, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@loerting
Copy link

loerting commented Jun 9, 2023

PanelPopup bewerbAKo = new PanelPopup(String.format("%s (%s)", name, desc), koIcon, new JScrollPane(SwingUtils.withPadding(koRoundPanel, 16)));
AbstractButton remove = bewerbAKo.addButton(AllIcons.Action.Delete.get(), "Bewerb entfernen");
...
tabFrame.addTab((TabFramePopup) bewerbAKo, name, koIcon, Alignment.SOUTH_WEST);
tabFrame.revalidate();
tabFrame.repaint();

Add a tab like this and change the LaF settings (using the Laf setting menu provided by darklaf) and the added buttons will disappear.

@loerting loerting added the bug Something isn't working label Jun 9, 2023
@loerting
Copy link
Author

loerting commented Jun 9, 2023

java.lang.invoke.WrongMethodTypeException: expected (JComponent,RepaintManager)void but found (JComponent,Void)void
	at java.base/java.lang.invoke.Invokers.newWrongMethodTypeException(Invokers.java:476)
	at java.base/java.lang.invoke.Invokers.checkExactType(Invokers.java:485)
	at org.pbjar.jxlayer.plaf.ext.TransformUI.setView(TransformUI.java:341)
	at org.pbjar.jxlayer.plaf.ext.TransformUI.lambda$new$1(TransformUI.java:179)
	at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:341)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:334)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:266)
	at java.desktop/java.awt.Component.firePropertyChange(Component.java:8731)
	at java.desktop/javax.swing.JLayer.setView(JLayer.java:235)
	at java.desktop/javax.swing.JLayer.remove(JLayer.java:380)
	at java.desktop/java.awt.Container.addImpl(Container.java:1118)
	at java.desktop/javax.swing.JLayer.setView(JLayer.java:232)
	at java.desktop/javax.swing.JLayer.<init>(JLayer.java:201)
	at org.pbjar.jxlayer.plaf.ext.transform.TransformUtils.createTransformJLayer(TransformUtils.java:77)
	at org.pbjar.jxlayer.plaf.ext.transform.TransformUtils.createTransformJLayer(TransformUtils.java:99)
	at com.github.weisj.darklaf.ui.tabframe.DarkTabFrameUI.installComponents(DarkTabFrameUI.java:120)
	at com.github.weisj.darklaf.ui.tabframe.DarkTabFrameUI.installUI(DarkTabFrameUI.java:82)
	at java.desktop/javax.swing.JComponent.setUI(JComponent.java:685)
	at com.github.weisj.darklaf.components.tabframe.JTabFrame.setUI(JTabFrame.java:118)
	at com.github.weisj.darklaf.components.tabframe.JTabFrame.updateUI(JTabFrame.java:87)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1363)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1378)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1378)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1378)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1378)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1378)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1378)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1378)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI0(SwingUtilities.java:1378)
	at java.desktop/javax.swing.SwingUtilities.updateComponentTreeUI(SwingUtilities.java:1354)
	at com.github.weisj.darklaf.LafInstaller.updateLafRecursively(LafInstaller.java:73)
	at com.github.weisj.darklaf.LafInstaller.updateLaf(LafInstaller.java:65)
	at com.github.weisj.darklaf.LafInstaller.install(LafInstaller.java:53)
	at com.github.weisj.darklaf.LafManager.install(LafManager.java:457)
	at com.github.weisj.darklaf.LafManager.installTheme(LafManager.java:431)
	at com.github.weisj.darklaf.settings.ThemeSettings.lambda$applyTheme$6(ThemeSettings.java:524)
	at com.github.weisj.darklaf.ui.util.UIThread.runOnUIThread(UIThread.java:30)
	at com.github.weisj.darklaf.settings.ThemeSettings.applyTheme(ThemeSettings.java:523)
	at com.github.weisj.darklaf.settings.ThemeSettings.peek(ThemeSettings.java:497)
	at com.github.weisj.darklaf.settings.ThemeSettings.apply(ThemeSettings.java:492)
	at com.github.weisj.darklaf.settings.ThemeSettings.lambda$createButtonPanel$4(ThemeSettings.java:410)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at com.github.weisj.darklaf.ui.button.DarkButtonListener.mouseReleased(DarkButtonListener.java:73)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/java.awt.Component.processEvent(Component.java:6400)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)

Could be related to it. Edit: This exception also happens when setting Theme using LafManager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant