method:showMessageDialog ( component, message, titlebar, joptionpane_constant, icon );
return type:void
special:static
content:ใช้สร้าง Message Dialog ขึ้นมา และมีการกำหนด ประเภทของ dialog นี้ด้วย
example:ImageIcon icon = new ImageIcon ( "C:/bamboo.gif" );
JOptionPane.showMessageDialog ( this, "Welcome to BambooLabcode.com", "website titlebar", JOptionPane.INFORMATION_MESSAGE, icon );
comment:ตัวแปร object_component ใช้กำหนด object ที่สร้าง dialog นี้ขึ้นมา
ตัวแปร object_string_message ใช้กำหนด ข้อความ ที่ต้องการให้แสดง
ตัวแปร object_string_titlebar ใช้กำหนด title bar ของ dialog
ตัวแปร joptionpane_constant ใช้กำหนด ประเภทของ dialog
ตัวแปร object_icon ใช้กำหนด icon ให้กับ dialog