Main.java:5: error: class Conversion2 is public, should be declared in a file named Conversion2.java
public class Conversion2 extends JFrame{
^
Main.java:21: error: Conversion2 is already defined in unnamed package
public class Conversion2 {
^
Main.java:26: error: non-static variable fahrenheitL cannot be referenced from a static context
fahrenheitL = new JLabel ("Fahrenheit",
^
Main.java:28: error: non-static variable celsiusL cannot be referenced from a static context
celsiusL = new JLabel ("Celsius",
^
Main.java:31: error: non-static variable fahrenheitTF cannot be referenced from a static context
fahrenheitTF = new JTextField(10);
^
Main.java:32: error: non-static variable celsiusTF cannot be referenced from a static context
celsiusTF = new JTextField(10);
^
Main.java:34: error: non-static variable calculateB cannot be referenced from a static context
calculateB = new JButton("Calculate");
^
Main.java:35: error: non-static variable cbHandler cannot be referenced from a static context
cbHandler = new CalculateButtonHandler();
^
Main.java:35: error: non-static variable this cannot be referenced from a static context
cbHandler = new CalculateButtonHandler();
^
Main.java:36: error: non-static variable cbHandler cannot be referenced from a static context
calculateB.addActionListener(cbHandler);
^
Main.java:36: error: non-static variable calculateB cannot be referenced from a static context
calculateB.addActionListener(cbHandler);
^
Main.java:38: error: non-static variable exitB cannot be referenced from a static context
exitB = new JButton ("Calculate");
^
Main.java:39: error: non-static variable ebHandler cannot be referenced from a static context
ebHandler = new ExitButtonHandler();
^
Main.java:39: error: non-static variable this cannot be referenced from a static context
ebHandler = new ExitButtonHandler();
^
Main.java:40: error: non-static variable ebHandler cannot be referenced from a static context
exitB.addActionListener(ebHandler);
^
Main.java:40: error: non-static variable exitB cannot be referenced from a static context
exitB.addActionListener(ebHandler);
^
Main.java:42: error: non-static method setTitle(String) cannot be referenced from a static context
setTitle("Fahrenheit and Celsius Conversion");
^
Main.java:44: error: non-static variable pane cannot be referenced from a static context
pane = getContentPane();
^
Main.java:44: error: non-static method getContentPane() cannot be referenced from a static context
pane = getContentPane();
^
Main.java:46: error: non-static variable pane cannot be referenced from a static context
pane.setLayout(new GridLayout(4,2));
^
Main.java:48: error: non-static variable fahrenheitL cannot be referenced from a static context
pane.add(fahrenheitL);
^
Main.java:48: error: non-static variable pane cannot be referenced from a static context
pane.add(fahrenheitL);
^
Main.java:49: error: non-static variable fahrenheitTF cannot be referenced from a static context
pane.add(fahrenheitTF);
^
Main.java:49: error: non-static variable pane cannot be referenced from a static context
pane.add(fahrenheitTF);
^
Main.java:50: error: non-static variable celsiusTF cannot be referenced from a static context
pane.add(celsiusTF);
^
Main.java:50: error: non-static variable pane cannot be referenced from a static context
pane.add(celsiusTF);
^
Main.java:51: error: non-static variable celsiusL cannot be referenced from a static context
pane.add(celsiusL);
^
Main.java:51: error: non-static variable pane cannot be referenced from a static context
pane.add(celsiusL);
^
Main.java:52: error: non-static variable calculateB cannot be referenced from a static context
pane.add(calculateB);
^
Main.java:52: error: non-static variable pane cannot be referenced from a static context
pane.add(calculateB);
^
Main.java:53: error: non-static variable exitB cannot be referenced from a static context
pane.add(exitB);
^
Main.java:53: error: non-static variable pane cannot be referenced from a static context
pane.add(exitB);
^
Main.java:55: error: non-static method setSize(int,int) cannot be referenced from a static context
setSize(WIDTH, HEIGHT);
^
Main.java:56: error: non-static method setVisible(boolean) cannot be referenced from a static context
setVisible(true);
^
Main.java:57: error: non-static method setDefaultCloseOperation(int) cannot be referenced from a static context
setDefaultCloseOperation(EXIT_ON_CLOSE);
^
Main.java:23: error: Illegal static declaration in inner class Conversion2.Conversion2
public static void main(String[] args) {
^
modifier 'static' is only allowed in constant variable declarations
36 errors