Customize JOptionPane Dialog

前端 未结 3 1568
南笙
南笙 2020-12-03 18:57

I am learning java swing. The code below is a catch block which handles an IOException and shows a error message.

 catch(IOException e)
    {
        System         


        
3条回答
  •  余生分开走
    2020-12-03 19:19

    I guess that depends on what's wrong with JOptionPaneshowMessageDialog(Component parentComponent, Object message, String title, int messageType, Icon icon)?

    JOptionPane.showMessageDialog(null, "Java Technolgy Dive Log", "Dive", JOptionPane.INFORMATION_MESSAGE, new ImageIcon("images/gwhite.gif"));
    

    Dialog

提交回复
热议问题