Netbeans Basic Java Swing User Interface Application (Windows 10)

Published: 31 May 2017
on channel: 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.


On this page of the site you can watch the video online Netbeans Basic Java Swing User Interface Application (Windows 10) with a duration of hours minute second in good quality, which was uploaded by the user Alan Wood 31 May 2017, share the link with friends and acquaintances, this video has already been watched 304 times on youtube and it was liked by 1 viewers. Enjoy your viewing!