Submitted by: Submitted by bishop45
Views: 309
Words: 1772
Pages: 8
Category: Science and Technology
Date Submitted: 02/15/2012 02:12 AM
Project
In
ITE – 104 Programming
Submitted by:
Joseph S. Madridano Jr.
Submitted To:
Mr. Jessie S. Hortelano
Block - C
Ala Carte Kiosk
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class AlaCarte extends JFrame implements ActionListener
{
static String[] yourChoicesItems = {"Blueberry Muffin 1.45",
"Strawberry Bagel 0.80",
"Lite Yogurt 0.75",
"Vanilla Ice Cream2.75",
"Hash Browns 2.50",
"Toast 2.00",
"French Fries 1.50",
"Onion Soup 3.00",
"Coffee 0.90",
"Iced Tea 1.00",
"Hot Chocolate 1.75"};
static double[] yourChoicesPrices = {1.45, 0.80, 0.75, 2.75, 2.50, 2.00, 1.50, 3.00, 0.90, 1.00, 1.75};
private JList yourChoices;
private JTextArea bill;
private Container pane;
public AlaCarte()
{
super("Welcome to Java Kiosk");
pane = getContentPane();
pane.setBackground(new Color(5, 100, 100));
pane.setLayout(new BorderLayout(5, 5));
JLabel yourChoicesJLabel = new JLabel("A LA CARTE MENU");
pane.add(yourChoicesJLabel,BorderLayout.NORTH);
yourChoicesJLabel.setFont(new Font("Dialog",Font.BOLD,20));
yourChoices = new JList(yourChoicesItems);
pane.add(new JScrollPane (yourChoices),BorderLayout.WEST);
yourChoices.setFont(new Font("Courier",Font.BOLD,14));
bill = new JTextArea();
pane.add(bill,BorderLayout.EAST);
bill.setFont(new Font("Courier",Font.PLAIN,12));
JButton button = new...