javax.swing.JPopupMenu.setBorderPainted()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(136)

本文整理了Java中javax.swing.JPopupMenu.setBorderPainted()方法的一些代码示例,展示了JPopupMenu.setBorderPainted()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPopupMenu.setBorderPainted()方法的具体详情如下:
包路径:javax.swing.JPopupMenu
类名称:JPopupMenu
方法名:setBorderPainted

JPopupMenu.setBorderPainted介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-awt

  1. /**
  2. * Creates a new tool bar with a specified
  3. * <code>name</code> and
  4. * <code>orientation</code>. All other constructors call this constructor.
  5. * If
  6. * <code>orientation</code> is an invalid value, an exception will be
  7. * thrown.
  8. *
  9. * @param name the name of the tool bar
  10. * @param orientation the initial orientation -- it must be * either <code>HORIZONTAL</code> or <code>VERTICAL</code>
  11. * @exception IllegalArgumentException if orientation is neither
  12. * <code>HORIZONTAL</code> nor <code>VERTICAL</code>
  13. */
  14. public ToolbarWithOverflow(String name, int orientation) {
  15. super(name, orientation);
  16. setupOverflowButton();
  17. popup = new JPopupMenu();
  18. popup.setBorderPainted(false);
  19. popup.setBorder(BorderFactory.createEmptyBorder());
  20. overflowToolbar = new JToolBar("overflowToolbar", orientation == HORIZONTAL ? VERTICAL : HORIZONTAL);
  21. overflowToolbar.setFloatable(false);
  22. overflowToolbar.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY, 1));
  23. }

代码示例来源:origin: stackoverflow.com

  1. JPopupMenu popup = new JPopupMenu();
  2. popup.add(button);
  3. popup.setBorderPainted(false);
  4. popup.setLightWeightPopupEnabled(false);
  5. return popup;

相关文章

JPopupMenu类方法