RUN |
InsyaAllah bisa....
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* JRNGAN_FUZIFIKASI.java
*
* Created on 02 Nov 11, 10:21:37
*/
package HERMAN;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import usu.widget.Form;
/**
*
* @author dobelf
*/
public class JRNGAN_FUZIFIKASI extends Form{
double s = 0;
double k = 0;
double output = 0;
double[][] ta = {{1, 3, 4}, {2, 4, 5}, {3, 6, 7}};
double[][] ha = new double[ta.length][ta[0].length];
/** Creates new form JRNGAN_FUZIFIKASI */
public JRNGAN_FUZIFIKASI() {
initComponents();
isi();
}
double segitiga(double input, double a, double b, double c) {
double x = 0;
if (input < a) {
x = 0;
} else if ((input >= a) && (input < b)) {
x = ((input - a) / (b - a));
} else if ((input >= b) && (input < c)) {
x = ((c - input) / (c - b));
} else {
x = 0;
}
return x;
}
double trapmin(double input, double a, double b) {
double x = 0;
if (input < a) {
x = 1;
} else if ((input >= a) && (input < b)) {
x = ((b - input) / (b - a));
} else if (input >= b) {
x = 0;
}
return x;
}
double trapplus(double input, double b, double c) {
double x = 0;
if (input < b) {
x = 0;
} else if ((input >= b) && (input < c)) {
x = ((input - b) / (c - b));
} else if (input >= c) {
x = 1;
}
return x;
}
double minimal(double input1, double input2) {
double x = 0;
if (input1 > input2) {
x = input2;
} else {
x = input1;
}
return x;
}
void isi() {
DefaultTableModel mdl = (DefaultTableModel) tabel2.getModel();
mdl.setNumRows(0);
for (int i = 0; i < ta[0].length; i++) {
if (i == 0) {
mdl.addRow(new Object[]{"Basah", ta[i][0], ta[i][1], ta[i][2]});
} else if (i == 1) {
mdl.addRow(new Object[]{"Sedang", ta[i][0], ta[i][1], ta[i][2]});
} else {
mdl.addRow(new Object[]{"Kering", ta[i][0], ta[i][1], ta[i][2]});
}
}
}
void fuzzi() {
if ((Double.parseDouble(inputSuhu.getText())) <= 50
&& (Double.parseDouble(inputKelembaban.getText()) <= 100 && Double.parseDouble(inputKelembaban.getText()) >= 50)) {
k = Double.parseDouble(inputKelembaban.getText());
double k1 = trapmin(k, 65, 85);
double k2 = segitiga(k, 65, 85, 100);
double k3 = trapplus(k, 85, 100);
s = Double.parseDouble(inputSuhu.getText());
double s1 = trapmin(s, 10, 25);
double s2 = segitiga(s, 10, 25, 40);
double s3 = trapplus(s, 25, 40);
ha[0][0] = minimal(k1, s1);
ha[0][1] = minimal(k1, s2);
ha[0][2] = minimal(k1, s3);
ha[1][0] = minimal(k2, s1);
ha[1][1] = minimal(k2, s2);
ha[1][2] = minimal(k2, s3);
ha[2][0] = minimal(k3, s1);
ha[2][1] = minimal(k3, s2);
ha[2][2] = minimal(k3, s3);
DefaultTableModel mdl = (DefaultTableModel) tabel1.getModel();
mdl.setNumRows(0);
for (int i = 0; i < ha[0].length + 1; i++) {
if (i == 0) {
mdl.addRow(new Object[]{s1, s2, s3});
} else if (i == 1) {
inputBasah.setText("" + k1);
mdl.addRow(new Object[]{ha[i - 1][0], ha[i - 1][1], ha[i - 1][2]});
} else if (i == 2) {
inputSedang.setText("" + k2);
mdl.addRow(new Object[]{ha[i - 1][0], ha[i - 1][1], ha[i - 1][2]});
} else {
inputkering.setText("" + k3);
mdl.addRow(new Object[]{ha[i - 1][0], ha[i - 1][1], ha[i - 1][2]});
}
}
} else {
JOptionPane.showMessageDialog(null, " Inputan suhu hanya berkisar 0-50\nInputan kelembaban hanya 50-100%", "WARNING", 1);
}
}
void Output() {
double jmlta = 0;
double jmlha = 0;
for (int i = 0; i < ta.length; i++) {
for (int j = 0; j < ta[0].length; j++) {
jmlta += (ta[i][j] * ha[i][j]);
jmlha += ha[i][j];
}
}
output = jmlta / jmlha;
inputOutput.setText(String.valueOf(output));
// lblHasil.setText("PERTUMBUHAN TANAMAN = \n"+sigmaMiuZ+"/"+sigmaMiu+" = "+output+" mm/bln");
}
/** 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 initComponents() {
fontBrowserBeanInfo1 = new usu.widget.FontBrowserBeanInfo();
jPanel4 = new javax.swing.JPanel();
panelGlassStyle1 = new usu.widget.glass.PanelGlassStyle();
btnDefuz = new javax.swing.JButton();
inputOutput = new javax.swing.JTextField();
jLabel9 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
txtRendah2 = new javax.swing.JLabel();
jScrollPane3 = new javax.swing.JScrollPane();
tabel1 = new javax.swing.JTable();
jPanel1 = new javax.swing.JPanel();
jScrollPane4 = new javax.swing.JScrollPane();
tabel2 = new javax.swing.JTable();
jPanel5 = new javax.swing.JPanel();
inputKelembaban = new javax.swing.JTextField();
txtKelembaban = new javax.swing.JLabel();
inputSuhu = new javax.swing.JTextField();
txtShu = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
inputSedang = new javax.swing.JTextField();
btnFuzzi = new javax.swing.JButton();
txtNormal = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
txtRendah1 = new javax.swing.JLabel();
txtRendah = new javax.swing.JLabel();
inputBasah = new javax.swing.JTextField();
txtTinggi = new javax.swing.JLabel();
inputkering = new javax.swing.JTextField();
label1 = new usu.widget.Label();
lblclose = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setAnimationHide(usu.widget.constan.Animation.HIDE_TO_LEFT);
setAnimationShow(usu.widget.constan.Animation.SHOW_FROM_RIGHT);
setBackground(new java.awt.Color(102, 0, 255));
getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 668, Short.MAX_VALUE)
);
getContentPane().add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(3425, 11, -1, -1));
panelGlassStyle1.setBackground(new java.awt.Color(204, 0, 255));
panelGlassStyle1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 0, 255)));
panelGlassStyle1.setForeground(new java.awt.Color(153, 51, 255));
panelGlassStyle1.setRequestFocusEnabled(false);
btnDefuz.setText("Defuzzifikasi");
btnDefuz.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnDefuzActionPerformed(evt);
}
});
jLabel9.setFont(new java.awt.Font("Tahoma", 1, 14));
jLabel9.setForeground(new java.awt.Color(255, 255, 255));
jLabel9.setText(" (pertumbuhan tanaman perbulan/mm) :");
jPanel2.setBackground(new java.awt.Color(153, 0, 255));
jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
txtRendah2.setFont(new java.awt.Font("Tahoma", 3, 11));
txtRendah2.setText("SUHU");
tabel1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null},
{null, null, null},
{null, null, null},
{null, null, null}
},
new String [] {
"Dingin", "Normal", "Panas"
}
) {
Class[] types = new Class [] {
java.lang.Double.class, java.lang.Double.class, java.lang.Double.class
};
boolean[] canEdit = new boolean [] {
false, false, true
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
tabel1.setIntercellSpacing(new java.awt.Dimension(2, 2));
tabel1.setName("Tabel Z"); // NOI18N
tabel1.setRowHeight(40);
jScrollPane3.setViewportView(tabel1);
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 484, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtRendah2, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(25, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(txtRendah2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(23, Short.MAX_VALUE))
);
jPanel1.setBackground(new java.awt.Color(153, 51, 255));
jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
tabel2.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Kelembaban\\Suhu", "Dingin", "Normal", "Panas"
}
) {
Class[] types = new Class [] {
java.lang.Object.class, java.lang.Double.class, java.lang.Double.class, java.lang.Double.class
};
boolean[] canEdit = new boolean [] {
false, false, true, true
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
tabel2.setIntercellSpacing(new java.awt.Dimension(2, 2));
tabel2.setName("Tabel Z"); // NOI18N
tabel2.setRowHeight(40);
jScrollPane4.setViewportView(tabel2);
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 483, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(553, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(15, Short.MAX_VALUE))
);
jPanel5.setBackground(new java.awt.Color(153, 0, 255));
txtKelembaban.setFont(new java.awt.Font("Tahoma", 1, 14));
txtKelembaban.setText("KELEMBABAN");
inputSuhu.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
inputSuhuActionPerformed(evt);
}
});
txtShu.setFont(new java.awt.Font("Tahoma", 1, 14));
txtShu.setText("SUHU");
jLabel1.setText("Masukan inputan di bawah ini :");
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtShu, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(txtKelembaban, javax.swing.GroupLayout.Alignment.TRAILING))
.addGap(18, 18, 18)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(inputKelembaban)
.addComponent(inputSuhu, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE))
.addGap(38, 38, 38))
.addGroup(jPanel5Layout.createSequentialGroup()
.addGap(74, 74, 74)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(57, Short.MAX_VALUE))
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
.addContainerGap(14, Short.MAX_VALUE)
.addComponent(jLabel1)
.addGap(18, 18, 18)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtShu)
.addComponent(inputSuhu, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtKelembaban)
.addComponent(inputKelembaban, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(47, 47, 47))
);
btnFuzzi.setText("Fuzzifikasi");
btnFuzzi.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnFuzziActionPerformed(evt);
}
});
txtNormal.setFont(new java.awt.Font("Tahoma", 3, 11));
txtNormal.setForeground(new java.awt.Color(255, 255, 255));
txtNormal.setText("Sedang");
jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18));
jLabel3.setForeground(new java.awt.Color(255, 255, 255));
jLabel3.setText("2008420049");
jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18));
jLabel2.setForeground(new java.awt.Color(255, 255, 255));
jLabel2.setText("HERMAN");
txtRendah1.setFont(new java.awt.Font("Tahoma", 3, 11));
txtRendah1.setForeground(new java.awt.Color(255, 255, 255));
txtRendah1.setText("KELEMBABAN");
txtRendah.setFont(new java.awt.Font("Tahoma", 3, 11));
txtRendah.setForeground(new java.awt.Color(255, 255, 255));
txtRendah.setText(" Basah");
inputBasah.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
inputBasahActionPerformed(evt);
}
});
txtTinggi.setFont(new java.awt.Font("Tahoma", 3, 11));
txtTinggi.setForeground(new java.awt.Color(255, 255, 255));
txtTinggi.setText("Kering");
label1.setText("label1");
lblclose.setFont(new java.awt.Font("Tahoma", 0, 18));
lblclose.setForeground(new java.awt.Color(255, 255, 255));
lblclose.setText("CLOSE");
lblclose.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
lblcloseKeyPressed(evt);
}
});
javax.swing.GroupLayout panelGlassStyle1Layout = new javax.swing.GroupLayout(panelGlassStyle1);
panelGlassStyle1.setLayout(panelGlassStyle1Layout);
panelGlassStyle1Layout.setHorizontalGroup(
panelGlassStyle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(panelGlassStyle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 236, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtRendah1, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelGlassStyle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(inputBasah, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(inputSedang, javax.swing.GroupLayout.DEFAULT_SIZE, 180, Short.MAX_VALUE)
.addComponent(inputkering, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))
.addComponent(txtRendah, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtNormal, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txtTinggi, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnFuzzi, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblclose))
.addGroup(panelGlassStyle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panelGlassStyle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelGlassStyle1Layout.createSequentialGroup()
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(527, 527, 527))
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addGap(168, 168, 168)
.addComponent(inputOutput, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addGap(129, 129, 129)
.addComponent(jLabel9)))
.addContainerGap())
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelGlassStyle1Layout.createSequentialGroup()
.addContainerGap(1378, Short.MAX_VALUE)
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addGap(575, 575, 575)
.addComponent(btnDefuz)
.addContainerGap(740, Short.MAX_VALUE))
);
panelGlassStyle1Layout.setVerticalGroup(
panelGlassStyle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addGroup(panelGlassStyle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addGap(62, 62, 62)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(txtRendah1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addGroup(panelGlassStyle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(jLabel3))
.addGap(18, 18, 18)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGap(18, 18, 18)
.addGroup(panelGlassStyle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addComponent(txtRendah, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelGlassStyle1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addGap(157, 157, 157)
.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(8, 8, 8)
.addComponent(inputOutput, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnDefuz)
.addGap(16, 16, 16)
.addComponent(lblclose))
.addGroup(panelGlassStyle1Layout.createSequentialGroup()
.addComponent(inputBasah, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(2, 2, 2)
.addComponent(txtNormal, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(inputSedang, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtTinggi, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(3, 3, 3)
.addComponent(inputkering, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnFuzzi)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
);
getContentPane().add(panelGlassStyle1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 926, -1));
pack();
}//
private void inputSuhuActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void btnFuzziActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
fuzzi();
}
private void btnDefuzActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
Output();
}
private void btnAturanActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void inputBasahActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
}
private void lblcloseKeyPressed(java.awt.event.KeyEvent evt) {
// TODO add your handling code here:
try {
int reply = JOptionPane.showConfirmDialog (this,"Yakin Mau Keluar?",""
+ "Bye - USER", JOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE);
if (reply == JOptionPane.YES_OPTION) {
setVisible (false);
dispose();
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
System.exit (0);
}
}
catch (Exception r) {
}
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new JRNGAN_FUZIFIKASI().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton btnDefuz;
private javax.swing.JButton btnFuzzi;
private usu.widget.FontBrowserBeanInfo fontBrowserBeanInfo1;
private javax.swing.JTextField inputBasah;
private javax.swing.JTextField inputKelembaban;
private javax.swing.JTextField inputOutput;
private javax.swing.JTextField inputSedang;
private javax.swing.JTextField inputSuhu;
private javax.swing.JTextField inputkering;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JScrollPane jScrollPane4;
private usu.widget.Label label1;
private javax.swing.JLabel lblclose;
private usu.widget.glass.PanelGlassStyle panelGlassStyle1;
private javax.swing.JTable tabel1;
private javax.swing.JTable tabel2;
private javax.swing.JLabel txtKelembaban;
private javax.swing.JLabel txtNormal;
private javax.swing.JLabel txtRendah;
private javax.swing.JLabel txtRendah1;
private javax.swing.JLabel txtRendah2;
private javax.swing.JLabel txtShu;
private javax.swing.JLabel txtTinggi;
// End of variables declaration
}
Semoga berhasil.. jumpa selanjutx ya.....
0 komentar :
Posting Komentar