Java的"How to Make Dialogs"教程演示驗證碼:定製JOptionPane的圖標
//custom title, custom icon
JOptionPane.showMessageDialog(frame, "Eggs are not supposed to be green.",
"Inane custom dialog", JOptionPane.INFORMATION_MESSAGE, icon);
這將創建如下對話框:
爲什麼需要JOptionPane.INFORMATION_MESSAGE
當圖標只會改爲icon
參數?
感謝您的鏈接,有用的信息,但不回答這個問題。 – Aaron
messageType不僅用於圖標,還用於窗口裝飾,根據您使用的外觀和感覺,這可能沒有效果。 – GerritCap
對不起,直到你的評論不太明白。 – Aaron