So, I am in a Java Programming Intro class, and for whatever reason I am just stuck on our final project. Basically I need this to work. It looks exactly as it should so far. We are supposed to use the actionPerformed method to make it work, and make the results show up on a new window, and it's supposed to look like this;
Event: Super Bowl 2011
Issued to: <Name>
Quantity: <NumberOfTickets>
Section: <Whicheveronetheychose>
Ticket Charge: $<Calculated Value>
Delivery Charge: $<10 or zero>
Total Charged: $<Calculated Value>
Here is what I have so far;
So yeah, any help is greatly appreciated.public class TicketApp extends JApplet { private int x; JLabel sbtLabel; JLabel name; JLabel tickets; JLabel section; JTextField nametext; JTextField tickettext; JComboBox sectionbox; JCheckBox express; JButton submit; public void init() { setLayout( new FlowLayout(FlowLayout.LEFT)); sbtLabel = new JLabel("<HTML><FONT SIZE=+1>Super Bowl Tickets 2011</FONT>"); name = new JLabel("<HTML>Enter Name"); nametext = new JTextField(12); tickets = new JLabel("<HTML>Number of Tickets"); tickettext = new JTextField(4); section = new JLabel("<HTML>Choose a Section"); sectionbox = new JComboBox(); sectionbox.addItem ("Club Box ($400)"); sectionbox.addItem ("Lower Deck ($200)"); sectionbox.addItem ("Upper Deck ($150)"); express = new JCheckBox("Express Delivery? (add $10)"); submit = new JButton("Submit Order"); add (sbtLabel); add (name); add (nametext); add (tickets); add (tickettext); add (section); add (sectionbox); add (express); add (submit); }
Thanks,
Jonathan Oty