Netbeans Basic Java Swing User Interface Application (Windows 10)

Publié le: 31 mai 2017
sur la chaîne: Alan Wood
304
1

Creates a simple SWING GUI to convert inches to centimetres (by mistake! I intended to do millimetres, as the labels say, but put 2.54 in place of 25.4).

Software: Netbeans 8.2, JDK 1.8_91, Windows 10.

The code for the conversion is

float inch,mm;

inch = Float.parseFloat(jTextField1.getText());
mm = inch * (float)25.4.;
jTextField2.setText(String.valueOf(mm));

You could add

private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt); }

to make the conversion happen as you change the inch box.


Sur cette page du site, vous pouvez voir la vidéo en ligne Netbeans Basic Java Swing User Interface Application (Windows 10) durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Alan Wood 31 mai 2017, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 304 fois et il a aimé 1 téléspectateurs. Bon visionnage!