Mehmet Ethem SULAN :: Çevik Yazılım ile Javada Proje Geliştirme :: Çevik Yazılım Ile Geliştirilen Havaalanı Sisteminin Ilk Sürümünün Java Kodu
package www.ethemsulan.com;
import javax.swing.SwingUtilities;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.JTextField;
import javax.swing.JButton;
import UyeSilmeUyg.UyeSilmeUyg;
public class UyeSilmeSayfasi extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jContentPane = null;
private JLabel jLabel = null;
private JTextField jTextField = null;
private JButton jButton = null;
private JButton jButton1 = null;
private JTextField getJTextField() {
if (jTextField == null) {
jTextField = new JTextField();
jTextField.setBounds(new Rectangle(123, 32, 92, 20));
    }
    return jTextField;
  }
private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setBounds(new Rectangle(33, 98, 102, 35));
jButton.setText("Uye Sil");
jButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
String tcNumarasi=jTextField.getText().trim();
int k=obj.uyeVarmi(tcNumarasi);
if(k==1){
JOptionPane.showMessageDialog(null, "Uye silme islemi basariyla gerceklesti");
jTextField.setText("");
}else{
JOptionPane.showMessageDialog(null, "Silinecek uyenin tc nosu yok.Silme basarisiz");
          }
        }
      });
    }
    return jButton;
  }
private JButton getJButton1() {
if (jButton1 == null) {
jButton1 = new JButton();
jButton1.setBounds(new Rectangle(162, 101, 101, 31));
jButton1.setText("Kapat");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
BiletIslemleri obj=new BiletIslemleri();
  obj.setVisible(true);
  setVisible(false);
        }
      });
    }
    return jButton1;
  }
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
UyeSilmeSayfasi thisClass = new UyeSilmeSayfasi();
thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
thisClass.setVisible(true);
      }
    });
  }
UyeSilmeUyg obj;
public UyeSilmeSayfasi() {
    super();
    initialize();
    obj=new UyeSilmeUyg();
  }
private void initialize() {
this.setSize(300, 229);
this.setContentPane(getJContentPane());
this.setTitle("Silinecek Uyenin Tc Numarasini Girin");
  }
private JPanel getJContentPane() {
if (jContentPane == null) {
jLabel = new JLabel();
jLabel.setBounds(new Rectangle(23, 30, 69, 16));
jLabel.setText("Tc No:");
jContentPane = new JPanel();
jContentPane.setLayout(null);
jContentPane.add(jLabel, null);
jContentPane.add(getJTextField(), null);
jContentPane.add(getJButton(), null);
jContentPane.add(getJButton1(), null);
    }
    return jContentPane;
  }
} 

Write a Comment

Let me know what you think?