article

Monday, July 1, 2019

Java Swing Tutorial JTextField Usage Using Netbeans IDE

Java Swing Tutorial JTextField Usage Using Netbeans IDE
 
private void cmdsubmitActionPerformed(java.awt.event.ActionEvent evt) {
  String message = "Hello,"+txtname.getText();
  lblmessagedisplay.setText(message);
}

private void cmdsubmitActionPerformed(java.awt.event.ActionEvent evt) {
    int a=Integer.parseInt(x);
 String y=(String) jComboBox1.getSelectedItem();
 int b=Integer.parseInt(y);
 int r=a*b;
 String z=Integer.toString(r);
 txtresult.setText(z);
}

private void cmdsubmitActionPerformed(java.awt.event.ActionEvent evt) {
 String s1=tf1.getText();
 String s2=tf2.getText();
 int a=Integer.parseInt(s1);
 int b=Integer.parseInt(s2);
 int c=0;
 c=a+b;
 String result=String.valueOf(c);
 tf3.setText(result);
}

Related Post