Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 716439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:17:58+00:00 2026-05-14T05:17:58+00:00

I am supposed edit some code for an assignment, and he gave us the

  • 0

I am supposed edit some code for an assignment, and he gave us the framework and wants us to implement code for it. I load the project into netbeans and can’t figure out how I’m supposed to edit the swing components. I don’t see how to edit source vs. design.

import javax.swing.*;
import java.util.*;
import java.io.*;

public class CurrencyConverterGUI extends javax.swing.JFrame {
/**************************************************************************************************************
insert your code here - most of this will be generated by NetBeans, however, you must write code for the event listeners and handlers for the two ComboBoxes, the two TextBoxes, and the Button.  Please note you must also
poulate the ComboBoxes withe currency symbols (which are contained in the KeyList attribute of
CurrencyConverter CC)
***************************************************************************************************************/

    private CurrencyConverter CC;
    private javax.swing.JTextField Currency1Field;
    private javax.swing.JComboBox Currency1List;
    private javax.swing.JTextField Currency2Field;
    private javax.swing.JComboBox Currency2List;
    private javax.swing.JButton jButton1;
    private javax.swing.JPanel jPanel1;
}


class CurrencyConverter{
    private HashMap HM; // contains the Currency symbols and conversion rates
    private ArrayList KeyList; // contains the list of currency symbols

    public CurrencyConverter() {
       /**************************************************
        Instantiate HM and KeyList and load data into them.
        Do this by reading the data from the Rates.txt file
       ***************************************************/
    }

    public double convert(String FromCurrency, String ToCurrency, double amount){
    /***************************************************************************
         Will return the converted currency value.  For example, to convert 100 USD
         to GBP, FromCurrency is USD, ToCurrency is GBP and amount is 100.  The rate
         specified in the file represent the amount of each currency which is
         equivalent to one Euro (EUR). Therefore, 1 Euro is equivalent to 1.35 USD
     Use the rate specified for USD to convert to equivalent GBP:

     amount / USD_rate * GBP_rate
       ****************************************************************************/
    }

    public ArrayList getKeys(){
    // return KeyList
    }

}

This is what we were given, but I can’t do anything with it inside the GUI editor. (Can’t even get to the GUI editor). I have been staring at this for about an hour. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:17:58+00:00Added an answer on May 14, 2026 at 5:17 am

    Layout don’t seem to be defined here.. they just gave you which components should be displayed but it’s up to you to place them..

    so I would advice to forget about netbeans editor (since it’s a simple currency converter with 2 textfields, 2 comboboxes and a button) and try to build it by yourself.

    As you can notice the class extends JFrame so you can directly instantiate the instance variables already present and add them to the frame itself.

    It would be useful because you will learn how GUI works without exploiting, then for a so simple excercise you can easily go by code!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some test code that i'm just trying to use to figure out
For some reason, the elements that are supposed to be loaded using this code
EDIT: I dug into the extremely well-documented source code in Decker's link ( vector
I'm saving a struct into a .dat file. Lets suppose I have to edit
Supposed a text file named name.txt . there are some contents as the following
I supposed the include-command copy-pastes code in the compilation, it is wrong because the
I've got some code that puts a line-through on a TR for deleted rows,
I am writing some code to update an application by fetching new dlls from
Say I have some code like this function Chart(start, end, controller, method, chart) {
I've come across some old code <object id=foo classid=/location/bar.dll#ProjectName.ClassName viewastext></object> It doesn't currently work

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.