LeeAnne Murphy

Greenhorn
+ Follow
since Aug 15, 2011
Merit badge: grant badges
For More
St. Louis, MO
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by LeeAnne Murphy

I completely re-wrote my code. Now if I click on the chart option for my gui it gives these errors.


Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not yet implemented
at jp2wk5calc.Chart.<init>(Chart.java:14)
at jp2wk5calc.JP2wk5calc.onButtonChart(JP2wk5calc.java:318)
at jp2wk5calc.JP2wk5calc$4.actionPerformed(JP2wk5calc.java:144)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4651)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:616)
at java.awt.EventQueue$2.run(EventQueue.java:614)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:613)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Here is my code


13 years ago
Won't need to take another java programming class. This one ends on Monday and then I have a week off and start Introduction to Unix. I just can't get the hang of programming in java, I have struggled for the last 4 weeks in class.
13 years ago
ok I figured out what I did wrong..wasn't paying attention to spelling. I know this is a lot of code but for the class this is the only way I kinda understand...so I am still not getting this stuff. I am dumb when it comes to this type of programming so I try to remember what I have done from week to week and use the book as guideline but still not fully understanding.

Here is the portion from the original code that is still giving me problems. I just don't understand what is being explained to me...as I said I am dumb when it comes to java programming



bold is what is giving the errors
13 years ago



the errors are on line 22, 34, 181, and 187 - I don't understand the errors - need explanation in simple terms...Sorry keep forgetting things

line 22 error - class wk5calcjp2 is public, should be declared in a file named wk5calcjp2.java
line 34 error - illegal start of expression
line 181 error - bad operand types for binary operation, first type; int [] second type; int
line 187 error - inconvertible types required: int, found :<any> and also bad operand types for binary operation, first type; [] second type; int
13 years ago
Ah got it...I removed the 2nd bracket.. and it cleared the error. Thank you.
13 years ago


Wk4calcjp2 newloan = new Wk4calcjp2()); (error says ';' expected) what does that mean?

[Edit: fixed code tags]
13 years ago
I'm really sorry...I don't understand what you are asking.

Why have you got that static nested class in the first place? ( I don't understand static statements)
13 years ago
Ok changed that and now the lines below it are giving me errors.



Here is the error.

non-static variable frame cannot be referenced from a static context
13 years ago
Errors in code are as follows:
C:\Users\LeeAnne\Documents\NetBeansProjects\week3mortcalcjp2\src\week3mortcalcjp2\Week3mortcalcjp2.java:274: invalid method declaration; return type required
C:\Users\LeeAnne\Documents\NetBeansProjects\week3mortcalcjp2\src\week3mortcalcjp2\Week3mortcalcjp2.java:274: invalid method declaration; return type required
public setSize() {
1 error
C:\Users\LeeAnne\Documents\NetBeansProjects\week3mortcalcjp2\nbproject\build-impl.xml:603: The following error occurred while executing this line:
C:\Users\LeeAnne\Documents\NetBeansProjects\week3mortcalcjp2\nbproject\build-impl.xml:245: Compile failed; see the compiler error output for details.



13 years ago
I understand that but the instructor for the class wants us to use the IDE. So that is where I am at. I will keep trying to figure it out.

Thank you for the help.
13 years ago
It was placed there by Netbeans IDE 7.0, if I don't have them up there then the lower part of the code errors on me.
13 years ago
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - illegal start of expression
at mortcalcjp2week3.Mortcalcjp2week3.main(Mortcalcjp2week3.java:58)
Java Result: 1
BUILD SUCCESSFUL (total time: 3 seconds)

I know it is in line 58 which is this part but I am so lost.


/**
* @param args the command line arguments
*/
public static void main(String[] args) {

// Requestor - Ninfa Pendleton - Rapid City, SD
// PRG/421
// August 22, 2011

// Service Request SR-mf-003 Mortgage Payment Calculator. Change Request #4:Write the program in Java (with a graphical
// user interface) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage
// and the user's selection from a menu of available mortgage loans:

// - 7 years at 5.35%
// - 15 years at 5.5%
// - 30 years at 5.75%

// Use an array for the mortgage data for the different loans. Display the mortgage payment amount followed by
// the loan balance and interest paid for each payment over the term of the loan. Allow the user to loop
// back and enter a new amount and make a new selection or quit. Please insert comments in the program to
// document the program.

private int term;
private double rate;
private double principal;
}



Can you explain what the stack trace is?
13 years ago
13 years ago
Let us continue the discussion of the actual code problem here
13 years ago
I tried that and when I previewed it didn't look any different than if I was to just paste the code I have in here. To make sure I understand do I paste the code first then click on the "code" button?
13 years ago