I have a JPanel on which I have put a JTable w/ JScrollPane. What I would like is when the user clicks the "Clear" button, to remove the JPanel.
I've used the .remove() and it removes it, but the problem I am having now is when the user clicks the calculate button a second time, both the first JPanel and the second Jpanel are shown.
I would like to completely delete the JPanel when the user clicks the "Clear" button so if the user clicks the "calculate" button a second time, only 1 JPanel(with Jtable and scrollPane) are visible.