import javax.swing.*; public class Hej { public static void main(String[] arg) { String c1 = JOptionPane.showInputDialog(null, "Timmar?"); int k1 = Integer.parseInt(c1); String c2 = JOptionPane.showInputDialog(null, "Minuter?"); int k2 = Integer.parseInt(c2); String c3 = JOptionPane.showInputDialog(null, "Sekunder?"); int k3 = Integer.parseInt(c3); JOptionPane.showMessageDialog(null, k1 * 3600 + " sekunder för timmarna"); JOptionPane.showMessageDialog(null, k2 * 60 + " sekunder för minuterna"); JOptionPane.showMessageDialog(null, k3 * 1 + " sekunder för sekunderna"); } }