0% found this document useful (0 votes)
22 views1 page

Ta

This document contains code for two Java methods, one that handles a key release event for a text box to calculate change and one that handles a button click event to clear fields.

Uploaded by

Dimas Alfian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

Ta

This document contains code for two Java methods, one that handles a key release event for a text box to calculate change and one that handles a button click event to clear fields.

Uploaded by

Dimas Alfian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

private void txt_bayarKeyReleased(java.awt.event.

KeyEvent evt) {

// TODO add your handling code here:

int a,b,c;

a=Integer.valueOf(txt_bayar.getText());

b=Integer.valueOf(txt_jumlah.getText());

c=a*b;

txt_kembalian.setText(""+c);

private void btn_inputActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

buttonGroup1.clearSelection();

txt_harga.setText("");

jurusan.setSelectedItem("Pilih Jurusan");

txt_nomor.setText("");

txt_nama.setText("");

txt_total.setText("");

txt_jumlah.setText("");

txt_bayar.setText("");

txt_jumlah.setText("");

txt_kembalian.setText("");

You might also like