[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Missing post? - see this post about spam for more information.
Event Handling  XML
Forum Index » GUI Development
Author Message
dakotasw

Newbie

Joined: 01/27/2012 19:31:19
Messages: 2
Offline

Hi

I have to do a mortgage program using graphical user interface. The user can input any amount for the principal of the loan and then have three options for a payment plan. The program should display the mortgage payment then list the loan balance and interest paid for each payment over the life of the loan.

I did the code but there is an event error and I cannot seem to understand why the error is there. The code is attached below. Any assistance would be appreciated.


dakotasw

Newbie

Joined: 01/27/2012 19:31:19
Messages: 2
Offline

I forgot to add the error I am getting when I try to compile it. I am using NetBeans so the errors are already shown before I compile. The error is below:

MortgageCalcOptions.java:131: error: cannot find symbol
event a = new event();
^
symbol: class event
location: class MortgageCalcOptions
MortgageCalcOptions.java:131: error: cannot find symbol
event a = new event();
^
symbol: class event
location: class MortgageCalcOptions
MortgageCalcOptions.java:164: error: cannot find symbol
String arg = event.getActionCommand();
^
symbol: variable event
location: class MortgageCalcOptions
3 errors
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 884
Location: Superior, CO, USA
Online

Remember that Java is case sensitive - there is no event class but there is an Event class.

And just some feedback - do yourself a favor and name your variables like a human is going to read your code. It doesn't cost anything to name your variables in a way that makes sense - 'a' is far harder to figure out than something like actionListenerEvent.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
chowbaaron

1 cup a day
[Avatar]

Joined: 11/06/2011 20:53:10
Messages: 47
Location: New York, USA
Offline

To help you out in the future, classes generally start with an Uppercase letter. Therefor, whenever you get an error like:

symbol: class event
location: class MortgageCalcOptions
MortgageCalcOptions.java:131: error: cannot find symbol
event a = new event();
^

see that they are talking about "class event". This should tell you that "event" should be "Event".
 
Forum Index » GUI Development
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2012 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle