void () { if (popupMenu.getLayout() == null || popupMenu.getLayout() instanceof UIResource) { popupMenu.setLayout(new DefaultMenuLayout(popupMenu, BoxLayout.Y_AXIS)); } popupMenu.setOpaque(true); LookAndFeel.installColorsAndFont(popupMenu, "PopupMenu.background", "PopupMenu.foreground", "PopupMenu.font"); }