help
From: Richard (rswashuk_at_charter.net)
Date: 02/15/04
- Next message: Mladen Adamovic: "Re: which GUI library to use for database app to simply making form?"
- Previous message: Karsten Lentzsch: "Re: which GUI library to use for database app to simply making form?"
- Next in thread: David Rabinowitz: "Re: help"
- Reply: David Rabinowitz: "Re: help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 15 Feb 2004 10:07:29 -0500
Help!
I have had VB6, C++, well versed in html but I am about to pull my hair out
on JAVA!!! I am getting an error in line 54 of this code. Can someone help
me please? I am a college student trying to get a grasp on this situation
but "Shelley Cashman Series" is not making it easy. This is a problem for
my class.
C:\Documents and Settings\Administrator\My Documents\Java
Assignments\BillsBurgersApplet.java:54: class expected
order1 = double.parsedouble(order2);
^
1 error
Tool completed with exit code 1
/*
Chapter 3: problem 7
Programmer: Richard
Date: 2/12/2004
FileName: BillsBurgersApplet.java
Purpose: To calculate sales tax
*/
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class BillsBurgersApplet extends Applet implements ActionListener
{
//declaring variables
String order1;
double order2, tax, total;
//construct components
Label billsLabel = new Label("Bills Burgers");
Label taxLabel = new Label("Tax Calculator");
Label orderLabel = new Label("How much was the order?");
TextField orderField = new TextField(10);
Label salestaxLabel = new Label("7% Sales Tax");
Label totaltaxLabel = new Label("Total Sales Tax: ");
TextField totaltaxField = new TextField(5);
Label totalorderLabel = new Label("Total amount due: ");
TextField totalorderField = new TextField(10);
Label calcLabel = new Label("Press Calculate button to total order..");
public void init()
{
setForeground(Color.white);
setBackground(Color.black);
add(billsLabel);
add(taxLabel);
add(orderLabel);
add(orderField);
add(salestaxLabel);
add(totaltaxLabel);
add(totaltaxField);
add(totalorderLabel);
add(totalorderField);
add(calcButton);
calcButton.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
order1 = double.parsedouble(order2);
tax = .07;
orderLabel.setText();
System.out.println();
}
}
Richard
- Next message: Mladen Adamovic: "Re: which GUI library to use for database app to simply making form?"
- Previous message: Karsten Lentzsch: "Re: which GUI library to use for database app to simply making form?"
- Next in thread: David Rabinowitz: "Re: help"
- Reply: David Rabinowitz: "Re: help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]