Hi, I am new to java. I am doing my assignment and using JTable, JFrame & JscrollPane to display a report for my input data.
If I created Jtable, and add Jscrollpane(ie, JScrollPane = new JScrollPane(table)) and attached to Jframe in a procedure called doReport, it works ok as I can resize, can scroll and data display perfectly.
But the problem is when I add new data, and display report, it will display new frame, so I moved frame outside doReport. It works ok, as only 1 frame, and adding data correctly. But it starts got problem when I resize, or scroll, the displayed data is collapsed, ie, only one or two rows display even table has more than 10 rows.
I closed table and display again, it still incorrect after I scroll or resize.
Please help me. Thanks.