Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

help I am having trouble getting the field to fill in

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have my program working while I am using the drop down menue, However I want to be able to select the JCheckBox and it will allow me to enter any amounts and it will do the math and fill in the monthly payment and the chart. here is my program:


[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ July 22, 2004: Message edited by: Dirk Schreckmann ]
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When posting code, please be sure to surround the code with the [code] and [/code] UBB Tags. This will help to preserve the formatting of the code, thus making it easier to read and understand.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to the Swing / JFC / AWT forum...
 
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The general idea is to check to see if altchoice is selected and then figure out your variables y and r based on what you discover. Then move into your calculating and finally into the displaying of monthly data.

Note the use of the arrays terms and rates as storage devices. You get the index of the selection in method and use this to collect your term and rate data.

Rewriting your program so that blocks of repeated code (used in different places or situations) appear only once is called refactoring.

Once your gui is onscreen all the action is focused in and through the event code. If you keep the code in the listeners simple and call methods to do the work it will make the logic easy to follow, design and understand.
reply
    Bookmark Topic Watch Topic
  • New Topic