Skip to content

Instantly share code, notes, and snippets.

@yakutozcan
Last active August 29, 2015 14:19
Show Gist options
  • Save yakutozcan/a099e55565ff77561467 to your computer and use it in GitHub Desktop.
Save yakutozcan/a099e55565ff77561467 to your computer and use it in GitHub Desktop.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
SonucTXT.setText("Sonuç : ");
//JTextField den gelen string veri tipi Integer türüne çevriliyor.
int Sayi1Int = Integer.parseInt(Sayi1.getText());
int Sayi2Int = Integer.parseInt(Sayi2.getText());
if (Sayi1Int > Sayi2Int) {
SonucTXT.setText(SonucTXT.getText()+"\nSayi1, Sayi2'den buyuktur");
} else if (Sayi1Int < Sayi2Int) {
SonucTXT.setText(SonucTXT.getText()+"\nSayi2, Sayi1'den buyuktur");
} else {
SonucTXT.setText(SonucTXT.getText()+"\nSayilar esittir");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment