problem while linking new.java to home.java
<p>I have two files: <code>home.java</code> and <code>new. java</code></p>

<p>When I click a button in <code>home.java</code> called "new", <code>new.java</code> should open and it is opening correctly if I am including these lines of code in <code>actionPerformed</code> method of button:</p>

<pre><code>home newinstance = new home()
newinstance.setVisible(true);
</code></pre>

<p>Everything is going according to the plan except that the <code>new.java</code> is opening in new window and the old <code>home.java</code> is not dissapearing</p>

<p>I want the <code>new.java</code> to come not as new window but same window and <code>home.java</code> to disappear. (If first will occur second wil automatically occur)</p>
