how to get value of text radio button to other form in java netbeans

Viewed 56

I wanna move the text radio button to label other form

I already using string to move other form but still can't

I have 2 variable radio button : 1. RBYa and 2. RBTidak

and I want the text still get selected from radio button

code

private void btnHitungActionPerformed(java.awt.event.ActionEvent evt) { 
         if (RBYa.isSelected()){
                        LBAntar.setText("35000");
                        RBYa.getText();
                    }
        
        if(RBTidak.isSelected()){
                        LBAntar.setText("0");
                        RBTidak.getText();
                    }

    private void BTNTampilActionPerformed(java.awt.event.ActionEvent evt) {                                          
        // TODO add your handling code here:
        nota pindah=new nota();

        pindah.LBJenis2.setText(CBJenis.getSelectedItem()+"");
        pindah.LBNama2.setText(TFNama.getText());
        pindah.LBJumlah2.setText(TFJumlah.getText());
        pindah.LBAntar2.            // here I want to enter the text of the radio button
        pindah.LBTotal2.setText(TFTotal.getText());
        
        pindah.setVisible(true);
    }             
0 Answers
Related