Tell me tha IDE that will do this work to me.
example of code
/**
* @(#)label.java
*
* label application
*
* @author
* @version 1.00 2008/12/30
*/
/**
* @(#)label.java
*
* label application
*
* @author
* @version 1.00 2008/12/30
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class label {
public static void main(String[] args) {
JFrame frame = new mainframe();
frame.show();
}
}
class mainframe extends JFrame{
mainframe(){
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setTitle("LABEL");
setLocation(25,25);
setSize(400,500);
setBackground(Color.green);
getContentPane().add(new tempPanel());
}
}
class tempPanel extends JPanel implements ActionListener {
JLabel d;
JLabel c;
JTextField f;
JButton boton;
JLabel l1;
tempPanel(){
d = new JLabel("enter farentheiht tempurature");
f = new JTextField(5);
c = new JLabel();
l1 = new JLabel(" ");
boton = new JButton("boot");
setLayout(new BorderLayout());
add(d,BorderLayout.WEST);
add(f,BorderLayout.EAST);
addİ;
add(l1);
add(boton,BorderLayout.SOUTH);
boton.addActionListener(this);
}
public void actionPerformed(ActionEvent event ){
double fn = Double.parseDouble(f.getText());
double cn = (5*(fn - 32))/9;
f.setText("");
c.setText("the tic" + cn);
}
}

Start a new topic
Add Reply




MultiQuote


| 


