I have the following problem with a JPanel: I am currently getting information from a database and displaying it in a JTable. Rather than make my own TableModel, I simply create a new JTable, remove the old JTable, and put the new one in its place. In order to do this, I set the first JTable to null, call the JPanel's repaint method to get rid of it, add the new JTable, and call repaint again to show it. The problem is, the new JTable doesn't appear unless I click somewhere on the application. I've tried using a Graphics object to repaint it manually, but it tells me that those methods are protected and that I don't have access to them, even though I'm using an instance JPanel. What am I doing wrong? I can't figure it out.