posted 16 years ago
I have a mortgage caculator that calculates a monthly mortgage payment and displays the mortgage's amortization table(when/if the user presses the table button). I also have a clear button that clears all the fields and removes the JPanel that my JTable is on.
My problem is this. When I click the Clear button, The JPanel is removed with the following code(it does what i want it to do):
getContentPane().remove(amortTablePanel);
getContentPane().repaint();
My problem is that when i calculate another mortgage and click the Amortization Table button, both the first and the second tables show up.
How can I completely remove the table when i click the Clear button?
Thanks in advance.