Computer Science, asked by Ronald11, 1 year ago

Write a GUI program to find the largest number.


Ronald11: any three numbers

Answers

Answered by anuj
2
THe code is as follows with design and output in the images: 


private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                                 // TODO add your handling code here:

        int a=Integer.parseInt(jTextField1.getText());                int b=Integer.parseInt(jTextField2.getText());                        int c=Integer.parseInt(jTextField3.getText());                        if(a>b&&a>c)                            jTextField4.setText(""+a);                        else if(b>a&&b>c)                             jTextField4.setText(""+b);                        else                             jTextField4.setText(""+c);

Attachments:
Similar questions