Great Deal! Get Instant $25 FREE in Account on First Order + 10% Cashback on Every Order Order Now

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package...

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*
package nq.realestate;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextArea;
**
*
* @author Hp
*
public class BookingDetails implements ActionListener {

JFrame f1;
JLabel l1;
Font ft, ft1;
JButton b1, b2;
JTextArea ta;
BookingDetails() {

XXXXXXXXXXf1 = new JFrame("NQ-Real Estate");
f1.setVisible(true);
XXXXXXXXXXb1 = new JButton("Back");
XXXXXXXXXXb2 = new JButton("Exit");

XXXXXXXXXXft = new Font("Courier New", Font.BOLD, 20);
XXXXXXXXXXft1 = new Font("Courier New", Font.BOLD, 15);
XXXXXXXXXXl1 = new JLabel("**NQ-Real Estate Services**
*****************************");
XXXXXXXXXXta = new JTextArea();
XXXXXXXXXXta.setFont(ft1);
XXXXXXXXXXServicesInfo sv = new ServicesInfo();
sv.f.setVisible(false);

XXXXXXXXXXint numofrooms = sv.getNumRooms();
XXXXXXXXXXdouble gardenarea = sv.getAreaOfGarden();
XXXXXXXXXXint weeks = sv.getNumWeeks();
XXXXXXXXXXboolean isLuxury = sv.getIsLuxury();
XXXXXXXXXXdouble total = sv.BookingCalc(weeks, numofrooms, gardenarea, isLuxury);

XXXXXXXXXXta.setText("\n\n\t*******Booking Details*******\n\n\tPeriod : " + sv.getNumWeeks() + "\n\tNo of Rooms : " + sv.getNumRooms() + "\n\tArea of Garden: " + sv.getAreaOfGarden() + "\n\tTotal Charges : " + total);
XXXXXXXXXXta.setEditable(false);

XXXXXXXXXXl1.setBounds(50, 15, 400, 50);
XXXXXXXXXXl1.setFont(ft);

XXXXXXXXXXta.setBounds(30, 80, 400, 280);

XXXXXXXXXXb1.setBounds(100, 370, 100, 30);
XXXXXXXXXXb2.setBounds(210, 370, 100, 30);

XXXXXXXXXXb1.addActionListener(this);
XXXXXXXXXXb2.addActionListener(this);
XXXXXXXXXXf1.setLayout(null);
XXXXXXXXXXf1.setSize(500, 500);
XXXXXXXXXXf1.setVisible(true);
XXXXXXXXXXf1.setResizable(false);
XXXXXXXXXXf1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
XXXXXXXXXXf1.add(l1);
XXXXXXXXXXf1.add(b2);
XXXXXXXXXXf1.add(b1);
XXXXXXXXXXf1.add(ta);

}

@Ove
ide
public void actionPerformed(ActionEvent e) {
XXXXXXXXXXif (e.getSource() == b1) {
XXXXXXXXXXServicesInfo s= new ServicesInfo();
XXXXXXXXXXs.f.setVisible(true);
XXXXXXXXXXf1.setVisible(false);
}

Exit button
XXXXXXXXXXif (e.getSource() == b2) {
XXXXXXXXXXint dialogResult = JOptionPane.showConfirmDialog(null, "Are you sure you want to exit?", "Warning", JOptionPane.YES_NO_OPTION);
XXXXXXXXXXif (dialogResult == JOptionPane.YES_OPTION) {
XXXXXXXXXXJOptionPane.showMessageDialog(f1, "Thank You for Using NQ-Services");
XXXXXXXXXXSystem.exit(0);
}
}
}
}
Sep 21, 2019
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here