Program 1 lbl text Field checkbox lbl text

Program 1

lbl text. Field checkbox lbl text. Field lbl checkbox button

Frame title Text=“…. ” lbl text. Field checkbox lbl checkbox Text= “” lbl text. Field lbl checkbox button

Chang variable name

double total=0; String patient = patienttxt. get. Text(); if (patient. equals("")) { JOption. Pane. show. Message. Dialog(null, "กรณาใสชอ", "กรอกชอ", JOption. Pane. ERROR_MESSAGE); }else { if (j. Check. Box 1. is. Selected()) { total = total+500; Double click ปมคดเงน } ใส code น if (j. Check. Box 2. is. Selected()) { total = total+800; } if (j. Check. Box 3. is. Selected()) { total = total+700; } Decimal. Format baht = new Decimal. Format("0. 000"); totaltxt. set. Text(baht. format(total));

Double click ปม เรมใหม ใส code patienttxt. set. Text(""); j. Check. Box 1. set. Selected(false); j. Check. Box 2. set. Selected(false); j. Check. Box 3. set. Selected(false); totaltxt. set. Text("");

Program 2

Text = “����� ” j. Radio j. Labael j. Text. Field j. Button

change variable name

Decimal. Format dollars = new Decimal. Format("0. 00 บาท; (" int qty = Integer. parse. Int(qtytxt. get. Text()); double price = Double. parse. Double(pricetxt. get. Text()); if(yes. RB. is. Selected()){ discount = 0. 03; }else Double click ปม คดราคา { discount = 0. 00; } double result = qty*price*(1 -discount); totaltxt. set. Text(String. value. Of(dollars. format(result)));

Double click ปมเรมใหม qtytxt. set. Text(""); pricetxt. set. Text(""); totaltxt. set. Text(""); yes. RB. set. Selected(false); no. RB. set. Selected(true);

Program 3

j. Labael j. Text. Field j. Spinner j. Button j. Text. Area

change variable name

Double click ปมคำนวณ double principal = Double. parse. Double(principaltxt. get. Text()); double rate = Double. parse. Double(ratetxt. get. Text()); int year = (Integer)j. Year. Spinner. get. Value(); j. Text. Area 1. set. Text("Yeart. Amount on Deposit"); j. Text. Area 1. append("n===t========="); Decimal. Format dollars = new Decimal. Format("0. 00 Baht"); for (int i = 1; i <= year; i++) { double amount = principal*Math. pow((1+rate/100), i); j. Text. Area 1. append("n"+i+"t"+dollars. format(amount)); }

New j. Frame = “Order. GUI” j. Label 3 j. Text. Field 3 2 Combo. Box j. Panel 3 j. Text. Area 3 j. Frame 1 j. Button 3

Set text property Text = … Chang variable name j. Tabletxt j. Name. CB Chang variable name
- Slides: 17