Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions AboutUs.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package Travel;

import java.awt.EventQueue;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextPane;
import java.awt.Font;
import java.awt.Image;

public class AboutUs {

JFrame Aboutus_frame;

/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
AboutUs window = new AboutUs();
window.Aboutus_frame.setVisible(true);
window.Aboutus_frame.setLocationRelativeTo(null);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}

/**
* Create the application.
*/
public AboutUs() {
initialize();
}

/**
* Initialize the contents of the frame.
*/
private void initialize() {
Aboutus_frame = new JFrame();
Aboutus_frame.setBounds(100, 100, 679, 496);
Aboutus_frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Aboutus_frame.getContentPane().setLayout(null);

JLabel lblNewLabel = new JLabel("");
Image images = new ImageIcon(this.getClass().getResource("about.png")).getImage().getScaledInstance(581,410, Image.SCALE_DEFAULT);
lblNewLabel.setIcon(new ImageIcon(images));
lblNewLabel.setBounds(44, 10, 641, 441);
Aboutus_frame.getContentPane().add(lblNewLabel);

// JTextPane textPane = new JTextPane();
// textPane.setFont(new Font("Tahoma", Font.PLAIN, 17));
// textPane.setBounds(0, 0, 651, 451);
// Aboutus_frame.getContentPane().add(textPane);
// textPane.setText("Who We Are?\r\nFounded in the year 2010 as Travel Planner. The Travel Planner is with its professionally "
// + "managed travel engine specializes mainly in providing services such as Holidays Packages , Domestic and "
// + "International Flight Booking, Bus Booking, Hotel Reservations , Domestic and International Tailor maid Tours , "
// + "Honeymoon Package, Visa. These services are delivered underneath the supervision of deft executives to retain "
// + "their consistency and superiority at the doorsteps of our esteemed clients.\r\n\r\nTravel Planner, is active "
// + "across to provide a world-class travel experience with dedication. We always aim to offer exciting experiences, "
// + "the best programmes, meticulously planned itineraries and all inclusive tours conducted by professional, "
// + "experienced, enthusiastic and seasoned tour managers.");
}
}
219 changes: 219 additions & 0 deletions Admin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
package Travel;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JButton;

public class Admin {

private JFrame frame;
private JTextField txtaddcity;
private JTextField txtremovecity;

/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Admin window = new Admin();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}

/**
* Create the application.
*/
public Admin() {
initialize();
}

/**
* Initialize the contents of the frame.
*/
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 749, 479);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);

JLabel lblNewLabel = new JLabel("Enter city to add:");
lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 15));
lblNewLabel.setBounds(86, 76, 172, 31);
frame.getContentPane().add(lblNewLabel);

txtaddcity = new JTextField();
txtaddcity.setBounds(249, 84, 96, 19);
frame.getContentPane().add(txtaddcity);
txtaddcity.setColumns(10);

JLabel lblEnterCityTo = new JLabel("Enter city to remove:");
lblEnterCityTo.setFont(new Font("Tahoma", Font.PLAIN, 15));
lblEnterCityTo.setBounds(86, 203, 172, 31);
frame.getContentPane().add(lblEnterCityTo);

txtremovecity = new JTextField();
txtremovecity.setColumns(10);
txtremovecity.setBounds(249, 211, 96, 19);
frame.getContentPane().add(txtremovecity);

JButton btnNewButton = new JButton("Add");
btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 15));
btnNewButton.setBounds(154, 149, 85, 21);
frame.getContentPane().add(btnNewButton);

JButton btnRemove = new JButton("Remove");
btnRemove.setFont(new Font("Tahoma", Font.BOLD, 15));
btnRemove.setBounds(134, 257, 125, 21);
frame.getContentPane().add(btnRemove);

JButton btnRemove_1 = new JButton("See all cities");
btnRemove_1.setFont(new Font("Tahoma", Font.BOLD, 15));
btnRemove_1.setBounds(130, 356, 246, 43);
frame.getContentPane().add(btnRemove_1);
}
}


//package Travel;
//
//import java.util.*;
//
//public class Admin {
// String city55;
// String city2;
// String c1[];
// int num_city;
// City check_city1,Remov_city;
// Userr userinfo = new Userr();
// Graph busNetwork = new Graph(true,true,true,true,true,true,false);
// Scanner s = new Scanner(System.in);
//
// //Method for Admin login to check whether the entered password is correct or not
// String Checkpassword(String password) {
// Scanner scan=new Scanner(System.in);
// int exit=0;
// while(!password.equals("sam")){
// System.out.print("\nINCORRECT PASSWORD\nTO EXIT PRESS 1: ");
// exit=scan.nextInt();
// if(exit==1) {
// System.out.println("YOU HAVE EXIT SUCCESSFULLY!!");
// break;
// }
// else {
// System.out.print("\nPLEASE ENTER VALID PASSWORD: ");
// password = scan.next();
// }
// }
// return password;
// }
// public void AdminLogin() {
// int bc;
// int bd;
// int bt;
// int tc;
// int td;
// int tt;
// int choice = 0;
// System.out.println("\nAdmin is Loged in");
// do {
// System.out.println("\n**Enter the following choice**");
// System.out.println("0. Exit");
// System.out.println("1. Show booked trips");
// System.out.println("2. Add a city to your trip");
// System.out.println("3. Remove a city from planed trip");
// System.out.println("4. Show cities present");
// System.out.println("5. user to check");
// choice = s.nextInt();
//
// switch (choice) {
// case 0 :
// break;
// case 1:
// System.out.println("\nShowing the trips");
// userinfo.prevTrip();
// System.out.println("\nDo you want to know the path");
// System.out.println("1. yes / 2. No");
// int ch = s.nextInt();
// if (ch == 1) {
// userinfo.tripPath();
// } else {
// break;}
// break;
// case 2:
// System.out.println("\n*Adding city to trip*");
// System.out.print("\nEnter the City: ");
// city55 = s.next();
// City city55station = busNetwork.addCity(city55);
// System.out.println("\nEnter the number of routes you want to create");
// int n = s.nextInt();
// num_city = n;
// int i = 0;
// c1 = new String[50];
// while (n != 0) {
// System.out.println("\nEnter the nearest "+n+" cities");
// System.out.print("Enter " + (i+1) + " city : ");
// c1[i] = s.next();
// check_city1 = userinfo.checkCity(c1[i]);
// if (userinfo.checkCity(c1[i]) != null) {
// System.out.println("\nFor city " + c1[i] + "\nEnter the Routes cost and time");
// System.out.print("\nBus cost: ");
// bc = s.nextInt();
// System.out.print("Bus distance: ");
// bd = s.nextInt();
// System.out.print("Bus time: ");
// bt = s.nextInt();
// System.out.print("train cost: ");
// tc = s.nextInt();
// System.out.print("train distance: ");
// td = s.nextInt();
// System.out.print("train time: ");
// tt = s.nextInt();
// } else {
// System.out.println("City not there. try for some other 5");
// break;
// }
// busNetwork.addRoute(city55station, check_city1, bd, td, bc, tc, bt, tt);
//
// System.out.println("City is successfully added");
// i++;
// n--;
// }
// break;
//
// case 3:
// System.out.println("\nRemoving the city from planned trip");
// System.out.print("Enter the City to remove: ");
// city2 = s.next();
// for(int j=0;j<num_city;j++) {
// busNetwork.removeRoute(city2, c1[j]);
// }
// //busNetwork.removeCity(city2);
// System.out.println("City Removed Sucessfully");
// break;
//
// case 4 :
// busNetwork.print();
// break;
//
// case 5:
// userinfo.userLogin();
// break;
//
// default:
// System.out.println("Invalid Entry");
// }
//
// } while (choice != 0);
// System.out.println("Exit Sucessfully");
// }
//}
43 changes: 43 additions & 0 deletions Bus.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package Travel;

import java.awt.EventQueue;

import javax.swing.JFrame;

public class Bus {

private JFrame frame;

/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Bus window = new Bus();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}

/**
* Create the application.
*/
public Bus() {
initialize();
}

/**
* Initialize the contents of the frame.
*/
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 450, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}

}
Loading