Question: Write a JavaFX UI. Use a combobox to display the periodic table of element symbols for the first 20 elements. When a symbol is chosen,
Write a JavaFX UI. Use a combobox to display the periodic table of element symbols for the first 20 elements. When a symbol is chosen, display its weight.
public class Element implements java.io.Serializable { private int num; private String symbol; private double weight; public Element(int n, String s, double w) { num = n; symbol = s; weight = w; } @Override public String toString() { return "Num: " + num + " Symbol: " + symbol + " Weight: " + weight; } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
