List of usage examples for javax.swing JPopupMenu setSize
public void setSize(int width, int height)
From source file:picocash.components.mode.buttons.ModeButton.java
private void init() { setLayout(new MigLayout("fill")); add(iconLabel);/*w ww. j a v a 2s. com*/ add(nameLabel, "push"); add(minimizeLabel); minimizeLabel.setIcon(PicocashIcons.getSystemIcon("minimize-dark")); addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent arg0) { JPopupMenu popupMenu = new JPopupMenu(); fillPopupMenu(popupMenu); Dimension dimension = getSize(); popupMenu.setSize(dimension.width, popupMenu.getHeight()); popupMenu.show((Component) arg0.getSource(), -1, dimension.height + 3); } }); }