title: How to check if a jframe is opened?
body: <p>My code below create a new array and sends it to chat(jFrame).   </p>
  
  <pre><code>String info1[]=new String[3];
   // username , userid , userid2 are variables
   info1[0]=username4;
   info1[1]=""+userid;
   info1[2]=""+userid2;
  
   chat.main(info1);
  </code></pre>
  
  <p>But i need to modify this code to work such a way that it ,  if the chat jframe was opened,
  then dont open a new jFrame .But instead open a new tab in chat jframe . The code for chat frame is :</p>
  
  <pre><code>private void formWindowActivated(java.awt.event.WindowEvent evt) {       
    JScrollPane panel2 = new JScrollPane();
    JTextArea ta=new JTextArea("");
    ta.setColumns(30);
    ta.setRows(19);
    panel2.setViewportView(ta);
    jTabbedPane1.add("Hello", panel2);   
  }
  </code></pre>