Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Hello. I am working on a GUI that calculates millions of gallons

Hello. I am working on a GUI that calculates millions of gallons per

day to gallons per minute. I have my GUI class, a utility class for the calculation, and a main class to run the program. I am not sure how to put use the utility class in my GUI class. As it is right now, I keep getting an error that says:

Error:forms: C:\Users\Zackychaos\IdeaProjects\GUI’s and event handlers\src\waterflow\MGDtogpm.form: Cannot bind: field does not exist: waterflow.MGDtogpm.MGDtoGPM

My code is below. Any help is appreciated:

package waterflow; import javax.swing.*; import java.awt.event.*; public class WaterCalGUI extends JFrame { private JTextField mgdinput; private JTextField gpmoutput; private JButton conversionbutton; private double gpm; private double mgd; public WaterCalGUI(){ conversionbutton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { double mgd = Double.parseDouble(mgdinput.getText()); double gpm = mgd * 694.44; gpmoutput.setText(Double.toString(gpm)); } }); } }

package waterflow; public class WaterCalculator { private double gpm; private double mgd; public static void convertMGDtoGPM(double gpm, double mgd) { gpm = mgd * 694.44; System.out.println(gpm); } }

package waterflow; public class Main { public static void main(String[] args) { WaterCalGUI display = new WaterCalGUI(); } }

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"