第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

自定義按鈕不能在mac上工作(ButtonUI)

自定義按鈕不能在mac上工作(ButtonUI)

哈士奇WWW 2019-08-14 16:00:33
自定義按鈕不能在mac上工作(ButtonUI)我有一個(gè)應(yīng)用程序,它使用遍布文本和圖標(biāo)的自定義按鈕。適用于Windows和Linux,但現(xiàn)在OSX用戶抱怨。文本不會(huì)顯示在Mac上,只是'...'。代碼看起來很簡單,但是當(dāng)涉及到mac時(shí)我很無能為力。我怎樣才能解決這個(gè)問題?測試用例:package example.swingx;import example.utils.ResourceLoader;import com.xduke.xlayouts.XTableLayout;    import javax.swing.*;import javax.swing.plaf.ComponentUI;import java.awt.*;import java.awt.event.ActionEvent;public class SmallButton extends JButton {     private static ComponentUI ui = new SmallButtonUI();     public SmallButton() {         super();         /*  final RepaintManager repaintManager = RepaintManager.currentManager(this);         repaintManager.setDoubleBufferingEnabled(false);         setDebugGraphicsOptions(DebugGraphics.FLASH_OPTION);*/     }     public SmallButton(AbstractAction action) {         super(action);     }     public SmallButton(String text) {         super(text);     }     public SmallButton(Icon icon) {         super(icon);     }     public void updateUI() {         setUI(ui);     }     public static void main(String[] args) {         JFrame frame = new JFrame();         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         final JPanel buttonPanel = new JPanel(new XTableLayout());         SmallButton firstSmallButton = new SmallButton("One");         SmallButton secondSmallButton = new SmallButton("Two");         SmallButton thirdSmallButton = new SmallButton();         ImageIcon cameraIcon = (ImageIcon) ResourceLoader.getIcon("camera");         SmallButton fourth = new SmallButton();         fourth.setAction(new AbstractAction() {             public void actionPerformed(ActionEvent e) {                 System.out.println("Fourth button pressed!");             }         });
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 532 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)