JTable problem
<p>I have one panel which i am adding to dialog from some othere frame.
But  my problem is, i want to close the jdialog when user presses "Enter", </p>

<p>For Example,</p>

<p>from frame-1 i am  calling and adding the panel which contains table to the dialog from this frame,</p>

<pre><code> /* Frame_1*/

JDialog jd = new JDialog();
jd.add(panel1);  // This panel comes from another java file Frame_2 which contains     JTable and retruns Panel
</code></pre>

<p>So i want is that when user press "Enter" i want this dialog to be disposed, but the focus goes to table, and the code for listeners is in Frame_2 for JTable. and i dont know how to do dispose in Frame_2 for JDialog ??</p>
