我目前Java Jframe和一個按鈕沒有更新的小問題。Java JFrame沒有更新按鈕的設置
我試圖禁用打印按鈕,直至打開完成和JFrame的關閉新JFrame的印刷...
,如果當一個新的窗口時,此按鈕將只禁用,但會直到那時,它可以採取一點點時間....
我設置的按鈕做這個禁用:PrintBttn.setEnabled(false);
我已經打過電話mainPanel.revalidate(); mainPanel.repaint(); PrintBttn.revalidate(); PrintBttn.repaint
以及它們上面的混合物在其他論壇推薦...
我有點迷失在此刻,爲什麼它不會禁用按鈕,直到出現一個新窗口,因爲我做的第一件事就是如上所示禁用它,然後通過並創建新窗口。 ..
感謝, 埃裏克
請學習java命名約定並堅持使用它們 – kleopatra 2012-02-13 09:11:47