
อัพเดทวันที่: 26 มี.ค. 2557
วีดีโอน่ารู้ : โปรเจคอัพโหลดไฟล์รูปภาพไปไว้ในโฟลเดอร์
|
ข้อมูลการเขียนโค้ด Attribute Demo ด้วยภาษาjava
-เขียนด้วยภาษา java
-นามสกุลไฟล์ .java
-การเขียนโค้ด Attribute Demo
-สามารถใช้โปรแกรม EditPlus ในการรันโปรแกรม
ความหมายของโปรแกรม
การเขียนโค้ด Attribute Demo ด้วยภาษาjava
การใช้งา่นโปรแกรมในเบื้องต้น
1.ทำการรันโปรแกรม
2.ผลลัพธ์จะแสดงขึ้นมา เป็นAttribute Demo ได้แก่ OK, Cancel , Help
ประโยชน์ของโปรแกรม
1.สามารถนำโค้ดไปประยุกต์ใช้ได้กับการเขียนระบบอื่นๆ
ตัวอย่างโค้ดโปรแกรม
import java.awt.*;
public class AttributeDemo {
private Frame fr;
private Button bn1,bn2,bn3;
public void init() {
fr = new Frame("ShowAttribute");
bn1 = new Button("OK");
bn2 = new Button("Cancel");
bn3 = new Button("Help");
fr.setLayout(new FlowLayout());
fr.add(bn1);
fr.add(bn2);
fr.add(bn3);
fr.setFont(new Font("TimesRoman",Font.BOLD,16));
fr.setForeground(Color.blue);
fr.setBackground(Color.gray);
bn2.setForeground(Color.red);
fr.setSize(200,200);
fr.show();
}
public static void main(String args[]) {
AttributeDemo ad = new AttributeDemo();
ad.init();
}
}
วีดีโอน่ารู้ : โปรเจคคำนวนหาพื้นที่สามเหลี่ยม Project PHP
|

กดlike เพื่อติดตามข่าวสารและโปรเจค โค้ดใหม่ๆอัพเดทอยู่เสมอ
Tag : การเขียนโค้ด Attribute Demo การเขียนโปรแกรมภาษาjava ตัวอย่างโค้ดโปรแกรม สามารถใช้โปรแกรม EditPlus