swing - change popup height -


i have java swing popupmenu couple of menuitems.

is there way increase size of popup keeping same number of menuitems? example, add 10px before 1st menuitem , 10px after last menuitem.

how can this? can give me hint?

thanks

this pretty simple. since jpopupmenu container following code produce effect desire

jpanel p1 = new jpanel(); p1.setpreferredsize( new dimension(100,10)); jpanel p2 = new jpanel(); p2.setpreferredsize( new dimension(100,10));  menu.add(p1); menu.add(new jmenuitem("item 1")); menu.add(new jmenuitem("item 2")); menu.add(new jmenuitem("item 3"));     menu.add(p2); 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -