public class BusPayment extends JFrame{ private JButton paynow; private JButton cancel; private JComboBox<String> jComboBox1; private JFrame frame; private JLabel label1, label2, label3, label4; private JPanel panel1, panel2,panel3; private JRadioButton destination1; private JRadioButton destination2; private JRadioButton destination3; private JRadioButton destination4; private JRadioButton destination5; private JRadioButton destination6; private JComboBox company; private JTextField passengerstextfield; public BusPayment (){ frame.setTitle("Express Bus Ticketing Management System"); frame.setSize(1400,700); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); buildPanel(); panel1.add(label1); panel2.add(label2); panel2.add(passengerstextfield); panel2.add(label3); panel2.add(company); panel3.add(destination1); panel3.add(destination2); panel3.add(destination3); panel3.add(destination4); panel3.add(destination5); panel3.add(destination6); panel3.add(paynow); panel3.add(cancel); } private void buildPanel(){ panel1 =new JPanel(); label1=new JLabel("Welcome to the Express Bus Ticketing System! "); panel2=new JPanel(); label2=new JLabel("Number of Passenger(s): "); passengerstextfield=new …

Member Avatar
Member Avatar
+0 forum 2

The End.