
如圖中,自定義選單,其邊框怎么也去不掉,想將其設定與背景同色也做不到?
用過的方法:
this.setUI(new MenuUI(uiBackgroung, uiForeground));
this.addActionListener(listener);// 估計回應被選單內部事件先截 了,沒有回應
this.setBorder(BorderFactory.createLineBorder(background,0));
// this.setBorder(BorderFactory.createBevelBorder(0));
// this.setBorderPainted(false);
this.setFocusPainted(false);
在JMenu和JMenuItem中都試過了?
這條線到底是誰的?
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/262705.html
標籤:Java SE
上一篇:在PDF表單增加行
