title: repaint a frame in java
body: <p>I have written code for an online quiz. I would like to change questions by clicking "next" button, but repaint is not working; only new window is working. 
  i can't even hide jftMainFrame since it works for 8 windows only.quest is a list containing questions and options ,its accessed from access db.repaint() is not working while i click the button.
  i have 4 radiobuttons which displays the label.i want to repaint the label of radiobutton and also question
  Please help me.</p>
  
  <pre><code>    JFrame jtfMainFrame, jtfMainFrame1;
  
      nextButton.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
              System.out.println("Next question..");
              j++;
              quest = getCurrentQuestion();
              createWindow();
              validate();               
              }
          });
  </code></pre>