public pembayaran() {
        initComponents();
        dibayar.getDocument().addDocumentListener(new DocumentListener() {

            @Override
            public void insertUpdate(DocumentEvent e) {
                if (dibayar.getText().length()>0){
                    kembali.setText(String.valueOf(Integer.parseInt(dibayar.getText()) - Integer.parseInt(total_pesanan.getText())));
                }
            }

            @Override
            public void removeUpdate(DocumentEvent e) {
                if (dibayar.getText().length()>0){
                    kembali.setText(String.valueOf(Integer.parseInt(dibayar.getText()) - Integer.parseInt(total_pesanan.getText())));
                }
            }

            @Override
            public void changedUpdate(DocumentEvent e) {
                if (dibayar.getText().length()>0){
                    kembali.setText(String.valueOf(Integer.parseInt(dibayar.getText()) - Integer.parseInt(total_pesanan.getText())));
                }
            }
        });
    }