TempConversion

TempConversion - /Author D.S Malik t/Java program to convert the temperature between Celsius and/Fahrenheit import java.awt import java.awt.event i

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
t //************************************************************* //Author: D.S. Malik // //Java program to convert the temperature between Celsius and //Fahrenheit. //************************************************************* / import java.awt.*; import java.awt.event.*; import javax.swing.*; i public class TempConversion extends JFrame { private JLabel celsiusLabel; private JLabel fahrenheitLabel; private JTextField celsiusTF; private JTextField fahrenheitTF; private CelsHandler celsiusHandler; private FahrHandler fahrenheitHandler; private static final int WIDTH = 500; private static final int HEIGHT = 50; private static final double FTOC = 5.0 / 9.0; private static final double CTOF = 9.0 / 5.0; private static final int OFFSET = 32; public TempConversion() { setTitle("Temperature Conversion"); Container c = getContentPane(); c.setLayout(new GridLayout(1, 4)); celsiusLabel = new JLabel("Temp in Celsius: ", SwingConstants.RIGHT); fahrenheitLabel = new JLabel("Temp in Fahrenheit: ",
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/17/2011 for the course COMP 2301 taught by Professor Staff during the Spring '10 term at Kennesaw.

Page1 / 2

TempConversion - /Author D.S Malik t/Java program to convert the temperature between Celsius and/Fahrenheit import java.awt import java.awt.event i

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online