Membuat Aplikasi Menu Minuman Sederhana

aplikasi ini di tujukan kepada pelanggan untuk memesan sebuah minuman yang dimana bila di klik harganya akan muncul dan seberapa banyak pesanan yang di minta, di aplikasi ini saya membuat maximal 7 pesanan tapi sayangnya aplikasi ini hanya memuat 1 jenis pesanan saja

Screenshot_3.png

Screenshot_4.png

berikut sourcecodenya

private void PIActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+7000);
}

private void ETMActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+5000);
}

private void EJActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+6000);
}

private void LTActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+5000);
}

private void MLOActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+4000);
}

private void VNLAActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+4000);
}

private void JAActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+7000);
}

private void JMActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+7000);
}

private void JApleActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+7000);
}

private void WCoffeActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+5500);
}

private void CcinoActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+5500);
}

private void MCcainoActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”+5500);
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Harga.setText(“”);
TotalHarga.setText(“”);
}

private void PesanActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
JOptionPane.showMessageDialog(null, ” pesanan anda akan segera di antarkan ” +
“Terimakasih Sudah Memesan 😀 “);
}

private void TotalHargaActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}

private void jRB3ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(jRB3.isSelected()){
int bil1=Integer.parseInt(Harga.getText());
int bil2=3;
int hasil= bil1*bil2;
TotalHarga.setText(“”+hasil);
}else{
TotalHarga.setText(“”+0);
}
}

private void jRB2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(jRB2.isSelected()){
int bil1=Integer.parseInt(Harga.getText());
int bil2=2;
int hasil= bil1*bil2;
TotalHarga.setText(“”+hasil);
}else{
TotalHarga.setText(“”+0);
}
}

private void jRB4ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(jRB4.isSelected()){
int bil1=Integer.parseInt(Harga.getText());
int bil2=4;
int hasil= bil1*bil2;
TotalHarga.setText(“”+hasil);
}else{
TotalHarga.setText(“”+0);
}
}

private void jRB5ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(jRB5.isSelected()){
int bil1=Integer.parseInt(Harga.getText());
int bil2=5;
int hasil= bil1*bil2;
TotalHarga.setText(“”+hasil);
}else{
TotalHarga.setText(“”+0);
}
}

private void jRB6ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(jRB6.isSelected()){
int bil1=Integer.parseInt(Harga.getText());
int bil2=6;
int hasil= bil1*bil2;
TotalHarga.setText(“”+hasil);
}else{
TotalHarga.setText(“”+0);
}
}

private void jRB7ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
if(jRB7.isSelected()){
int bil1=Integer.parseInt(Harga.getText());
int bil2=7;
int hasil= bil1*bil2;
TotalHarga.setText(“”+hasil);
}else{
TotalHarga.setText(“”+0);
}
}

 

Amrizal

161011700062

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s