how to create currency converter

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Dec 2008
Posts: 8
Reputation: lonely girl is an unknown quantity at this point 
Solved Threads: 0
lonely girl lonely girl is offline Offline
Newbie Poster

how to create currency converter

 
0
  #1
Dec 11th, 2008
helllllllo friends

please can u help me????

i have project about creating currency converter using jGRASP i made the enterface using jframebuilder but i dont know how to complete it...i really need ur help friends
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 3,584
Reputation: jasimp has a spectacular aura about jasimp has a spectacular aura about jasimp has a spectacular aura about 
Solved Threads: 52
Featured Poster
jasimp's Avatar
jasimp jasimp is offline Offline
Senior Poster

Re: how to create currency converter

 
0
  #2
Dec 11th, 2008
Well how are we supposed to help you if we have no idea what your code is or what you need to help you "complete it"
"Argyou not with the hand you are dealt in cards or life." ---- Wizard and Glass
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 8
Reputation: lonely girl is an unknown quantity at this point 
Solved Threads: 0
lonely girl lonely girl is offline Offline
Newbie Poster

Re: how to create currency converter

 
0
  #3
Dec 12th, 2008
hi friend
i wanna show u my code but i dont know where i should put it
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 8
Reputation: lonely girl is an unknown quantity at this point 
Solved Threads: 0
lonely girl lonely girl is offline Offline
Newbie Poster

Re: how to create currency converter

 
0
  #4
Dec 12th, 2008
hi friend

here is my project plz run it
Attached Files
File Type: java jFrame.java (9.3 KB, 30 views)
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: how to create currency converter

 
0
  #5
Dec 12th, 2008
Originally Posted by lonely girl View Post
hi friend
i wanna show u my code but i dont know where i should put it
in your post, surrounded by Code tags
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 8
Reputation: lonely girl is an unknown quantity at this point 
Solved Threads: 0
lonely girl lonely girl is offline Offline
Newbie Poster

Re: how to create currency converter

 
0
  #6
Dec 12th, 2008
 /****************************************************************/ 
 /*                      jFrame                              */ 
 /*                                                              */ 
 /****************************************************************/ 
import java.awt.*; 
 import java.awt.event.*; 
 import javax.swing.*; 
 import javax.swing.event.*;
  import java.io.*;
 
 /** 
  * Summary description for jFrame 
  * 
  */ 
 public class jFrame extends JFrame 
 { 
   // Variables declaration 
   private JLabel jLabel1; 
   private JLabel jLabel2; 
   private JTextField jTextField1; 
   private JTextField jTextField2; 
   private JList jList3; 
   private JScrollPane jScrollPane1; 
   private JList jList4; 
   private JScrollPane jScrollPane2; 
   private JButton jButton1; 
   private JButton jButton2; 
   private JPanel contentPane; 
   // End of variables declaration 
  
  
   public jFrame() 
   { 
      super(); 
      initializeComponent(); 
      // 
      // TODO: Add any constructor code after initializeComponent call 
      // 
  
      this.setVisible(true); 
   } 
  
   /** 
    * This method is called from within the constructor to initialize the form. 
    * WARNING: Do NOT modify this code. The content of this method is always regenerated 
    * by the Windows Form Designer. Otherwise, retrieving design might not work properly. 
    * Tip: If you must revise this method, please backup this GUI file for JFrameBuilder 
    * to retrieve your design properly in future, before revising this method. 
    */ 
   private void initializeComponent() 
   { 
      jLabel1 = new JLabel(); 
      jLabel2 = new JLabel(); 
      jTextField1 = new JTextField(); 
      jTextField2 = new JTextField(); 
      jScrollPane1 = new JScrollPane(); 
      jScrollPane2 = new JScrollPane(); 
      jButton1 = new JButton(); 
      jButton2 = new JButton(); 
      contentPane = (JPanel)this.getContentPane(); 
  
      // 
      // jLabel1 
      // 
      jLabel1.setText("From:"); 
      // 
      // jLabel2 
      // 
      jLabel2.setText("To:"); 
      // 
      // jTextField1 
      // 
      jTextField1.addActionListener(new ActionListener() { 
         public void actionPerformed(ActionEvent e) 
         { 
            jTextField1_actionPerformed(e); 
         } 
			
  
      }); 
      // 
      // jTextField2 
      // 
      jTextField2.addActionListener(new ActionListener() { 
         public void actionPerformed(ActionEvent e) 
         { 
            jTextField2_actionPerformed(e); 
         } 
  
     }); 
      // 
      // jList3
		
		    
                String[] listcountriescurrency = { "USD:Utd States$", "EURO:Euro", "GBP:Utd Kingdom Pnd", "JPY:Japan Yen",
               "CAD:Canada$", "AUD:Australia$", "CHF:Switzerland Fr", "AED:Utd Arab Emirates Dhs" };
            
              Container contentpane;


               contentpane = getContentPane();
               contentpane.setLayout(new FlowLayout());
               jList3 = new JList(listcountriescurrency);
                jList3.setSelectedIndex(0);
               jList3.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
 
      // 
      jList3.addListSelectionListener(new ListSelectionListener() { 
         public void valueChanged(ListSelectionEvent e) 
         { 
            jList3_valueChanged(e);
            
                        
            
         } 
  
      }); 
      // 
      // jScrollPane1 
      // 
      jScrollPane1.setViewportView(jList3); 
      // 
      // jList4 
      
               contentpane = getContentPane();
               contentpane.setLayout(new FlowLayout());
               jList4 = new JList(listcountriescurrency);
                jList4.setSelectedIndex(0);
               jList4.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
 

      // 
      jList4.addListSelectionListener(new ListSelectionListener() { 
         public void valueChanged(ListSelectionEvent e) 
         { 
            jList4_valueChanged(e); 
         } 
  
      }); 
      // 
      // jScrollPane2 
      // 
      jScrollPane2.setViewportView(jList4); 
      // 
      // jButton1
      
      // 
      jButton1.setText("Convert"); 
      jButton1.addActionListener(new ActionListener() { 
         public void actionPerformed(ActionEvent e) 
         { 
            jButton1_actionPerformed(e);
             
         } 
  
      }); 
      // 
      // jButton2 
      // 
      jButton2.setText("Close"); 
      jButton2.addActionListener(new ActionListener() { 
         public void actionPerformed(ActionEvent e) 
         { 
            jButton2_actionPerformed(e);
            
            String message = "Thank you for using Our Currency Convertor";
            
               JOptionPane.showMessageDialog(null,message);
               System.exit(0);

 
         } 
  
      }); 
      // 
      // contentPane 
      // 
      contentPane.setLayout(null); 
      addComponent(contentPane, jLabel1, 9,17,60,18); 
      addComponent(contentPane, jLabel2, 178,19,60,18); 
     addComponent(contentPane, jTextField1, 4,225,89,22); 
      addComponent(contentPane, jTextField2, 186,226,80,22); 
      addComponent(contentPane, jScrollPane1, 7,42,152,166); 
      addComponent(contentPane, jScrollPane2, 173,42,154,167); 
      addComponent(contentPane, jButton1, 98,224,83,25); 
      addComponent(contentPane, jButton2, 270,225,73,25); 
      // 
      // jFrame 
      // 
      this.setTitle("Currency Converter Application"); 
      this.setLocation(new Point(29, 3)); 
      this.setSize(new Dimension(356, 287)); 
   } 
  
   /** Add Component Without a Layout Manager (Absolute Positioning) */ 
   private void addComponent(Container container,Component c,int x,int y,int width,int height) 
   { 
      c.setBounds(x,y,width,height); 
      container.add(c); 
   } 
  
   // 
   // TODO: Add any appropriate code in the following Event Handling Methods 
   // 
   private void jTextField1_actionPerformed(ActionEvent e) 
   { 
      System.out.println("\njTextField1_actionPerformed(ActionEvent e) called."); 
      // TODO: Add any handling code here 
		
		
  
   } 
  
   private void jTextField2_actionPerformed(ActionEvent e) 
   { 
      System.out.println("\njTextField2_actionPerformed(ActionEvent e) called."); 
     // TODO: Add any handling code here 
  
 
          } 
  
   private void jList3_valueChanged(ListSelectionEvent e) 
   { 
      System.out.println("\njList3_valueChanged(ListSelectionEvent e) called."); 
      if(!e.getValueIsAdjusting()) 
      { 
         Object o = jList3.getSelectedValue(); 
         System.out.println(">>" + ((o==null)? "null" : o.toString()) + " is selected."); 
         // TODO: Add any handling code here for the particular object being selected 
          
      } 
   } 
  
   private void jList4_valueChanged(ListSelectionEvent e) 
   { 
      System.out.println("\njList4_valueChanged(ListSelectionEvent e) called."); 
      if(!e.getValueIsAdjusting()) 
      { 
         Object o = jList4.getSelectedValue(); 
         System.out.println(">>" + ((o==null)? "null" : o.toString()) + " is selected."); 
         // TODO: Add any handling code here for the particular object being selected 
          
      } 
   } 
  
   private void jButton1_actionPerformed(ActionEvent e) 
   { 
      System.out.println("\njButton1_actionPerformed(ActionEvent e) called."); 
     // TODO: Add any handling code here 
  
   } 
  
   private void jButton2_actionPerformed(ActionEvent e) 
   { 
      System.out.println("\njButton2_actionPerformed(ActionEvent e) called."); 
      // TODO: Add any handling code here 
  
   } 
  
   // 
   // TODO: Add any method code to meet your needs in the following area 
   // 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
   
  
 //============================= Testing ================================// 
 //=                                                                    =// 
 //= The following main method is just for testing this class you built.=// 
 //= After testing,you may simply delete it.                            =// 
 //======================================================================// 
   public static void main(String[] args) 
   { 
      JFrame.setDefaultLookAndFeelDecorated(true); 
      JDialog.setDefaultLookAndFeelDecorated(true); 
      try 
      { 
         UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); 
      } 
      catch (Exception ex) 
      { 
         System.out.println("Failed loading L&F: "); 
         System.out.println(ex); 
      } 
      new jFrame(); 
   } 
 //= End of Testing = 
  
  
 }

i wish this is the correct way to post the codes
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 8
Reputation: lonely girl is an unknown quantity at this point 
Solved Threads: 0
lonely girl lonely girl is offline Offline
Newbie Poster

Re: how to create currency converter

 
0
  #7
Dec 13th, 2008
where r u friends???????
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4,505
Reputation: Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future Ezzaral has a brilliant future 
Solved Threads: 521
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: how to create currency converter

 
0
  #8
Dec 13th, 2008
Originally Posted by lonely girl View Post
where r u friends???????
You have not asked any question yet. You just dumped some code in your post. And posting in "IM-speak" won't earn you much help either.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 332
Reputation: quuba is on a distinguished road 
Solved Threads: 54
quuba quuba is offline Offline
Posting Whiz

Re: how to create currency converter

 
0
  #9
Dec 13th, 2008
1. you need coefficients to convert 8 currency among themselves 8*8
2. function to convert text values from JTextField to number
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 8
Reputation: lonely girl is an unknown quantity at this point 
Solved Threads: 0
lonely girl lonely girl is offline Offline
Newbie Poster

Re: how to create currency converter

 
0
  #10
Dec 13th, 2008
hi friends
first of all plz excuse my bad English...Actually English is my second language..

my question is where i should put the codes that will convert the currency? and what is the codes??

to be honest i have my friend project but i don’t wanna copy it i want to understand the codes...so plz can u give me simple codes and where i should put it??

thanks friends really u r very helpful
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Java Forum
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC