Making PopupMenus a bit longer


#1

Hey Jules, I’m customizing my PopupMenus with my own LookAndFeel so that the background is drawn with rounded corners. I want to add a bit of empty space at the bottom of every PopupMenu so that if I highlight the last entry, it doesn’t draw outside the rounded corners. Can you suggest the best way to always add a few pixels to the bottom of every PopupMenu?


#2

…and maybe at the top as well. I just want to add some vertical padding there.


#3

You could add a custom component that doesn’t do anything or possibly a section header with no text?


#4

Yeah, I thought about that. But it means that I have to remember to do it for every PopupMenu I create, or always use a subclass, or something. Doesn’t seem like the best way.


#5

It might be possible by tweaking the lookandfeel, I don’t know - you’d have to get stuck in there and dig around.