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
1 changed files with 6 additions and 0 deletions

View File

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