Adding JTable to JScrollPane
问题 I have been making a small application containing JTable . The question is this: when I am adding the JTable to the JScrollPane , it is giving me the error that the table component is added to a parent component more than once. getContentPane().add(new JScrollPane(table)); scrollPane.setViewportView(table); I see the problem but could not solve it. Any suggestions? public thirdFrame() { thirdFrame = new JFrame(); thirdFrame.setFont(new Font("David", Font.BOLD, 17)); thirdFrame.setTitle(