-
-
DevelopPlus.net
ขายสคริปต์เว็บไซต์ลงประกาศสินค้า
-
SiamACT.com
เวปไซต์ที่ให้คุณโฆษณาตนเอง
ขายสคริปต์เว็บไซต์ลงประกาศสินค้า
หากว่าคุณต้องการมีเว็บไซต์ลงประกาศสินค้าเป็นของตนเอง
แต่ว่าคุณไม่มความรู้เรื่องการติดตั้งเว็บ ไม่อยากเช่า hosting
โปรดติดต่อมาหาเรา ทางเราจะให้บริการปัญหาเหล่านี้กับท่าน
เวปไซต์ที่ให้คุณโฆษณาตนเอง
SiamACT.com เป็นเวปไซต์ที่ให้คุณสามารถโปรโมท หรือโฆษณาตนเองได้ตามต้องการ
หากคุณมีวิดีโอเกี่ยวกับตัวคุณอยู่แล้วใน YouTube.com และต้องการโฆษณาให้เป็นที่แพร่หลาย
SiamACT.com จะเป็นสื่อกลางของวิดีโอคลิบเหล่านี้
-
-
-
subject:ประเภทของ Dialog
content:ประเภทของ JOptionPane มี Dialog จำนวน 4 แบบ ดังนี้
- Message Dialog เป็น dialog ที่ใช้แสดงข้อความ
- Confirm Dialog เป็น dialog ที่ใช้เพื่อให้ยืนยันหรือยกเลิก
- Option Dialog เป็น dialog ทั่วไป
- Input Dialog เป็น dialog ที่ใช้เพื่อให้กรอกข้อมูล
-
subject:Dialog แบ่งออกเป็น 2 ลักษณะ
content:Dialog แบ่งออกเป็น 2 ลักษณะ ได้แก่
- Modal Dialog เป็นประเภทที่เมื่อเกิดขึ้นแล้ว จะไม่ยอมให้ทำงานอื่น จนกว่า dialog นั้นๆจะปิดตัวลง
- Modeless Dialog เป็นประเภทที่เมื่อเกิดขึ้นแล้ว จะยอมให้สามารถทงานอื่นๆได้ โดยไม่จำเป็นต้องปิด dialog นั้นๆก่อน
-
method:showMessageDialog ( component, message );
return type:void
special:static
content:ใช้สร้าง Message Dialog ขึ้นมา
example:JOptionPane.showMessageDialog ( this, "Welcome to BambooLabcode.com" );
comment:ตัวแปร object_component ใช้กำหนด object ที่สร้าง dialog นี้ขึ้นมา
ตัวแปร object_string_message ใช้กำหนด ข้อความ ที่ต้องการให้แสดง
-
method:showMessageDialog ( component, message, titlebar, joptionpane_constant )
return type:void
special:static
content:ใช้สร้าง Message Dialog ขึ้นมา และมีการกำหนด ประเภทของ dialog นี้ด้วย
example:JOptionPane.showMessageDialog ( this, "Welcome to BambooLabcode.com", "website titlebar", JOptionPane.INFORMATION_MESSAGE );
comment:ตัวแปร object_component ใช้กำหนด object ที่สร้าง dialog นี้ขึ้นมา
ตัวแปร object_string_message ใช้กำหนด ข้อความ ที่ต้องการให้แสดง
ตัวแปร object_string_titlebar ใช้กำหนด title bar ของ dialog
ตัวแปร joptionpane_constant ใช้กำหนด ประเภทของ dialog
-
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
-
method:showConfirmDialog ( component, question );
return type:void
special:static
content:ใช้สร้าง Confirm Dialog ขึ้นมา
example:JOptionPane.showConfirmDialog ( this, "Are you sure ?" );
comment:ตัวแปร object_component ใช้กำหนด object ที่สร้าง dialog นี้ขึ้นมา
ตัวแปร object_string_question ใช้กำหนด ข้อความ ที่ต้องการให้แสดงเป็นคำถาม
-
method:showConfirmDialog ( component, question, titlebar, constant );
return type:void
special:static
content:ใช้สร้าง Confirm Dialog ขึ้นมา และมีการกำหนดประเภทของ confirm dialog ด้วย
example:JOptionPane.showConfirmDialog ( this, "Are you sure ?", "Confirm", JOptionPane.OK_CANCEL_OPTION );
comment:ตัวแปร object_component ใช้กำหนด object ที่สร้าง dialog นี้ขึ้นมา
ตัวแปร object_string_question ใช้กำหนด ข้อความ ที่ต้องการให้แสดงเป็นคำถาม
ตัวแปร object_string_titlebar ใช้กำหนด title bar ของ dialog
ตัวแปร joptionpane_constant ใช้กำหนด ประเภทของ dialog
-
method:showInputDialog ( object_string_message );
return type:void
special:static
content:ใช้สร้าง Input Dialog ขึ้นมา
example:JOptionPane.showInputDialog ( "Your Name : " );
comment:ตัวแปร object_string_message ใช้กำหนด ข้อความ ที่แสดงสิ่งที่ต้องการให้กรอก
-
method:showInputDialog ( message, default );
return type:void
special:static
content:ใช้สร้าง Input Dialog ขึ้นมา โดยมีการกำหนด ข้อความ เริ่มต้นไว้ด้วย
example:JOptionPane.showInputDialog ( "Your Name : ", "bamboo" );
comment:ตัวแปร object_string_message ใช้กำหนด ข้อความ ที่แสดงสิ่งที่ต้องการให้กรอก
ตัวแปร object_string_default ใช้กำหนด ข้อความเริ่มต้นในช่องกรอก
-
property:ERROR_MESSAGE;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่า ใช้กำหนดประเภทให้กับ Message Dialog
ว่าเป็น error message
example:JOptionPane.showMessageDialog ( this, "ERROR : 404", "Error", JOptionPane.ERROR_MESSAGE );
-
property:INFORMATION_MESSAGE;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่า ใช้กำหนดประเภทให้กับ Message Dialog
ว่าเป็น information message
example:JOptionPane.showMessageDialog ( this, "Welcome to BambooLabcode.com", "website titlebar", JOptionPane.INFORMATION_MESSAGE );
-
property:WARNING_MESSAGE;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่า ใช้กำหนดประเภทให้กับ Message Dialog
ว่าเป็น warning message
example:JOptionPane.showMessageDialog ( this, "Your wrong one time.", "Warning", JOptionPane.WARNING_MESSAGE );
-
property:QUESTION_MESSAGE;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่า ใช้กำหนดประเภทให้กับ Message Dialog
ว่าเป็น question message
example:JOptionPane.showMessageDialog ( this, "What your name ?", "Question", JOptionPane.QUESTION_MESSAGE );
-
property:PLAIN_MESSAGE;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่า ใช้กำหนดประเภทให้กับ Message Dialog
ว่าเป็น plain message
example:JOptionPane.showMessageDialog ( this, "Hello World", "Plain", JOptionPane.PLAIN_MESSAGE );
-
property:DEFAULT_OPTION;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่า ใช้กำหนดประเภทให้กับ Confirm Dialog
ว่ามี ปุ่ม Ok เท่านั้น
example:JOptionPane.showConfirmDialog ( this, "Save Successfully", "Confirm", JOptionPane.DEFAULT_OPTION );
-
property:YES_NO_OPTION;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่า ใช้กำหนดประเภทให้กับ Confirm Dialog
ว่ามี ปุ่ม yes และ no
example:JOptionPane.showConfirmDialog ( this, "Are you bamboolabcode ?", "Confirm", JOptionPane.YES_NO_OPTION );
-
property:YES_NO_CANCEL_OPTION;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่า ใช้กำหนดประเภทให้กับ Confirm Dialog
ว่ามี ปุ่ม yes, no และ cancel
example:JOptionPane.showConfirmDialog ( this, "Are you like bamboolabcode ?", "Confirm", JOptionPane.YES_NO_CANCEL_OPTION );
-
property:OK_CANCEL_OPTION;
return type:int
special:static
content:ใช้คืนค่า ตัวเลข ที่เป็นค่าคงที่ ที่แทนความหมายว่า ใช้กำหนดประเภทให้กับ Confirm Dialog
ว่ามี ปุ่ม ok และ cancel
example:JOptionPane.showConfirmDialog ( this, "Are you delete ?", "Confirm", JOptionPane.OK_CANCEL_OPTION );