Prevent empty popup menu from showing if menu has no child items

This commit is contained in:
weisj 2021-08-05 12:24:46 +02:00
parent 4229e71352
commit 53750cffa2
No known key found for this signature in database
GPG key ID: 31124CB75461DA2A

View file

@ -44,4 +44,10 @@ public class TranslatedJMenu extends JMenu
componentReference.translate(); componentReference.translate();
} }
} }
@Override
public boolean isEnabled()
{
return super.isEnabled() && getMenuComponentCount() > 0;
}
} }