This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Movement and conversion of GetText input in OrderCalc method.  RSS feed

 
James Nobles
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My OrderCalculator class is throwing an exception. The input from my HourPanel that is supposed to add to my OrderCalc is cooperating. Thanks.




 
Chris Barrett
Bartender
Posts: 321
24
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Erik,

I'm not sure exactly what you mean, but I noticed two things:

1) If you mean there is a problem in the OrderCalculator JFrame with components not appearing - line 41 & 42 of the OrderCalculator class are assigning two components to the same BorderLayout.CENTER location.That doesn't work as only one component can be assigned to each BorderLayout location. For more information, please review: http://docs.oracle.com/javase/tutorial/uiswing/layout/border.html

2) If you mean the rate value being returned is 0.0 - In the HourPanel class , the method getHourCost() is returning 0.0 on line 44. So the value returned to OrderCalculator class is going to be 0.0. This will result in line 88 of OrderCalculator effectively being:


Cheers!
Chris
 
James Nobles
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will try and explain in more detail what is wrong with my program. I am trying to get my data put into the textField from inside the HourPanel class to get sent to my OrderCalculator class. Here is where it will be added to the customers selection of the JobType found in the Job Panel class. If I can explain this in any greater detail please let me know . Thanks

P.S. Complete Novice
 
Joanne Neal
Rancher
Posts: 3742
16
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
erik pierce wrote:the code is still not working.

ItDoesntWorkIsUseless
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!