title: refresh a jFrame with a JButton ActionListener
body: <p>I'm trying a simple app that would pick 4 random cards and display them on 4 buttons so far it's all good the thing is I want to add a refresh button that would refresh the random sections each time it's invoked but I can't get that done I've tried <code>revalidate();</code> and <code>repaint();</code> with no success.<br>
  I hope somebody can help me with this, thanks in advance.</p>
  
  <pre><code>    import java.awt.BorderLayout;
  import java.awt.GridLayout;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  
  import javax.swing.ImageIcon;
  import javax.swing.JButton;
  import javax.swing.JFrame;
  import javax.swing.JPanel;
  import javax.swing.SwingUtilities;
  
  
  public class rest extends JFrame{
      public rest(){
          int x=(int)(Math.random()*55);
          int y=(int)(Math.random()*55);
          int z=(int)(Math.random()*55);
          int b=(int)(Math.random()*55);
          ImageIcon i1= new ImageIcon("image/card/"+x+".png");
          ImageIcon i2= new ImageIcon("image/card/"+y+".png");
          ImageIcon i3= new ImageIcon("image/card/"+z+".png");
          ImageIcon i4= new ImageIcon("image/card/"+b+".png");
          JButton b1 = new JButton();
          b1.setIcon(i1);     
          JButton b2 = new JButton();
          b2.setIcon(i2);
          JButton b3 = new JButton();
          b3.setIcon(i3);
          JButton b4 = new JButton();
          b4.setIcon(i4);
          JPanel p = new JPanel();
          p.setLayout(new GridLayout(1,4,5,5));
          p.add(b1);      
          p.add(b2);
          p.add(b3);
          p.add(b4);
          JPanel p1= new JPanel();
          JButton b5 = new JButton("refresh");
          p1.setLayout(new BorderLayout());
          p1.add(b5,BorderLayout.EAST);
          setLayout(new BorderLayout());
          add(p,BorderLayout.CENTER);
          add(p1,BorderLayout.SOUTH);
          b5.addActionListener(new ActionListener() {
  
              @Override
              public void actionPerformed(ActionEvent e) {
                  //revalidate();
                  //repaint();
              }
          });
      }
  
      public static void main(String[] args) {
          rest f= new rest();
          f.setTitle("poker");
          f.setSize(300,300);
          f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          f.setLocationRelativeTo(null);
          f.setVisible(true);
  
      }
  
  }
  </code></pre>