gen = new JButton("Generate"); add(gen); gen.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Random randomGenerator = new Random(); for (int idx = 1; idx <= 1; ++idx){ int randomInt = randomGenerator.nextInt(999); test = new JLabel(""+randomInt+""); add(test); Random randomGenerator2 = new Random(); for (int idx2 = 1; idx <= 1; ++idx){ int randomInt2 = randomGenerator.nextInt(999); test = new JLabel(""+randomInt2+""); add(test); Random randomGenerator3 = new Random(); for (int idx3 = 1; idx <= 1; ++idx){ int randomInt3 = randomGenerator.nextInt(9999); test = new JLabel(""+randomInt3+""); add(test); } } } }});; }; }
Really need Some help.