Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

an applet that uses a list for currency

  Asked By: Robert    Date: Jun 06    Category: Java    Views: 609
  

I am stuck on a project. I have to do an applet that uses a
list for currency, then multiplies it by the ammount in a textbox,
then displays the total in another txt box. in that text box should
also be the currency chossen. here's what i got so far:

import java.applet.*;
import java.awt.*;
import java.awt.event.*;

public class ShapePicker extends Applet implements
ActionListener,ItemListener
{
Label lblOne, lblTwo, lblThree,
TextField txtAmmount, txtTotal,
List currencyList = new List();
double cPrice = {129.1,1.13,.702,7.411,2.21};
Button cmdConvert;

public void init()
{

lblOne=new Label("Please Select from the list a type of
currency: ");
add(lblOne);

add(currencyList);
currencyList.addItemListner(this);
currencyList.add("Japanese Yen");
currencyList.add("European Euros");
currencyList.add("British Pounds");
currencyList.add("French Francis");
currencyList.add("German Deutschmarks");

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on an applet that uses a list for currency Or get search suggestion and latest updates.




Tagged: