kiem tien, kiem tien online, kiem tien truc tuyen, kiem tien tren mang
Thứ Tư, 26 tháng 3, 2014

Here is the code of program:
//Làm tròn số
DecimalFormat df=new DecimalFormat("0"); // Định dạng cho số thập phân của bạn
df.setRoundingMode(RoundingMode.UP); // Làm tròn lên, ngoài ra còn rất nhiều mode cho bạn chọn, check java doc nhé
System.out.println("Tong luong = " + df.format(tongluong));

//Vị trí xuất hiện của JFrame
setLocationRelativeTo(null);//Giữa màn hình
this.setLocation(100, 100);// Vị trí trái trên cùng là x = 100, y = 100

//Sử dụng Date trong java
List lst = new ArrayList();
SimpleDateFormat fm=new SimpleDateFormat("dd-MM-yyyy");
lst.add(new NhanVienSanXuat(150, "A",fm.parse("01-01-1992"),"abced"));


Date date = new Date();
String strDateFormat = "dd/MM/yyyy";
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(strDateFormat);
System.out.println("Hôm nay là ngày : " + simpleDateFormat.format(date));

//KeyEvent
String str = "Key released: " + event.getKeyText(event.getKeyCode());

evt.getKeyCode() == KeyEvent.VK_ENTER
//JTable
jTable1.getColumnModel().getColumn(0).setPreferred Width(300);

getColumn(0) <-- trỏ đến cột có index = 0
setPreferredWidth(300) <-- set độ rộng = 300
26 Mar 2014

0 nhận xét:

Đăng nhận xét

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

domain, domain name, premium domain name for sales

Bài đăng phổ biến