The Artima Developer Community
Sponsored Link

Java Answers Forum
Creating a conversion Swing Applet

1 reply on 1 page. Most recent reply: Dec 9, 2004 8:13 AM by Matthias Neumair

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
jonh version

Posts: 2
Nickname: lex
Registered: Dec, 2004

Creating a conversion Swing Applet Posted: Dec 7, 2004 9:37 PM
Reply to this message Reply
Advertisement
It must prompt the user to enter a distance in miles in a dialog box, then converts miles to kilometers and displays the result in a jtextfield as "XX.XX Kilometers", where XX.XX is the number of kilometers.Formula miles * 1.6 converts miles to kilometers.


Matthias Neumair

Posts: 660
Nickname: neumi
Registered: Sep, 2003

Re: Creating a conversion Swing Applet Posted: Dec 9, 2004 8:13 AM
Reply to this message Reply
So?

I can't do your homework for you, but I can tell you that it it would be a good start looking at the API documentation of the JFrame and JDialog classes.

If you use a IDE with a form creator, you can add event handlers to the input field easily (only if you don't want to use a button to start the conversion).

Flat View: This topic has 1 reply on 1 page
Topic: Command line arguments - Printing out one string Previous Topic   Next Topic Topic: Generics ... again

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use