Need help creating a basic Temp Converter (Basic)
I am attempting to create a Temperature Converter using a GUI. It will incorporate two classes, one for the GUI and one for the CLI. I am unsure of how to implement them together and I'm also having some trouble with a few things;
First thing is this code I have created, could this be used with the GUI? Or am I going down the wrong road completely? Advice is appreciated;
public class tempConverter
public double getCelsius()
public double getFahrenheit()
public void setCelsius(double temperature)
public void setFahrenheit(double temperature)
public double toCelsius(double fahrenheit)
public double toFahrenheit(double celsius)
public static void main(String args)
System.out.printf("\nEnter a selection (1-2): ");
System.out.printf("\nEnter a temperature to convert from: ");
//Print Celsius/Fahrenheit conversion temps.
The next part is within' the GUI I have created a Frame using JFrame, I have also created a menuBar and within' this menuBar there is three tabs. I am stuck with the 'Help' tab, I've created a drop down called 'Instructions', what I'm looking to do is for a popup window to open when 'Instructions' is clicked displaying some basic instructions on how to use the program.
The final part I am stuck with is creating buttons using a boxLayout, I have tried many guides and I can't seem to get it working, I would like a row of numbers starting from 0-9 that will allow me to click one of these buttons and input a number into a label (Creating the label has also become a problem).
If anyone can help me with these problems or guide me in the right direction I would be so greatful.