JTable header not showing

前端 未结 3 1284
故里飘歌
故里飘歌 2021-01-11 22:59

JTable header not showing...

My JTable header wont show even if add it into a container like JScrollPane...tell me why is it happen and how can i fix it or debug i

3条回答
  •  遥遥无期
    2021-01-11 23:27

    Same problem I have face You have to add the JTable to the JScrollPane then add JscrollPane to JFrame e.g.

    JTable table = new JTable();
    JScrollPane scrollPane= new  JScrollPane(table);
    frame.add(scrollPane);
    

提交回复
热议问题