简体   繁体   English

如何在jFrame上隐藏jTable

[英]How to hide jTable at jFrame

How to hide jTable at jFrame in java GUI, not just hide the column, but entire jTable ? 如何在java GUI中的jFrame中隐藏jTable ,而不仅仅是隐藏列,而是整个jTable

I was try to use table.setVisible(false) , but just hide a column not entire table 我试图使用table.setVisible(false) ,但只是隐藏一个列而不是整个表

You cannot hide the table, but you can hide your panel containing the table instead. 您无法隐藏表格,但您可以隐藏包含表格的面板。

yourPanel.setVisible(false);

Whenever you want to show the table do yourPanel.setVisible(true); 每当你想要显示表时,执行yourPanel.setVisible(true);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM