Nama : deny Ghopur .s
NIM : 2010420066 Kalu anda ingin menggopi file saya silakan gratis .....
package segitiga;
/*
* LuasLingkaran.java
*
* Created on Dec 5, 2011, 2:06:26 PM
*/
/**
*
* @author H@ruM
*/
public class Luas_Segitiga extends javax.swing.JFrame {
/** Creates new form LuasLingkaran */
public Luas_Segitiga() {
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
double alas=Integer.parseInt(jTextField1.getText());
jTextField1.setText(null);
double tinggi= Integer.parseInt(jTextField2.getText());
jTextField2.setText(null);
double hasil= (alas*tinggi)/2;
jTextField3.setText(String.valueOf(hasil));
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Luas_Segitiga().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField3;
// End of variables declaration
}
Posted by 06.29 and have
0
komentar
, Published at
Tidak ada komentar:
Posting Komentar