• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Need HELP Temperature Conversion

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This program is to perform conversions between F and C temperatures. Input Components are input temperature(textfield), Output precision(a choice), conversion to be performed (a group of checkbox objects), output text size(scrollbar), Calculate(button), and a help menu with an about menu item.(displaying pop-up frame).
Output component is resulting temperature(Label).
I know the code would be placed in the adjustmentValueChanged() method, but I don't know how I could change the label's font (to be larger or smaller) based upon the scrollbar.
The pop-up frame, when I click the menu item, the both main frame and menu item frame pop up. How could I chage it so that only menu item frame will pop up? Also, the button is not working. I mean, the whole program is not working... it doesn't calculate.. do anything...
Could someone please check my code below and let me know what I should do.
thanks

thank you.
 
kei hosima
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I figured out the pop-up frame part.
Now, when I click a button, nothing happen.
I mean NOTHING.
could someone please give me advice.
Thank you

Any suggesion/advice/hints would be greatly appriciated.
Thank you in advance.
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I bet something DOES happen. Are you compiling and running this program from the command line? If so, you should add some System.out.println() calls inside your ActionPerformed() method to see what is going on. I'll make some comments here about what I *think* is happening, but you should use println() calls to make sure.
Let's look at your ActionPerformed method:

The getSource() method returns the object that generated the event. It looks like your first if statement compares this returned object against the String "Convert". I doubt that the event was generated by a String object. Instead, you should use

HTH
Layne
[ February 23, 2003: Message edited by: Layne Lund ]
 
kei hosima
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh... that's true.
What was I thinking...
I changed to 'convButton'.
I'm using JBuilder 4 to compile the code.
I guess I need to think the if statement little bit more.
thank you very much for you help!
 
please buy my thing and then I'll have more money:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic