📄 tablehelper.java
字号:
/*
* TableHelper.java
*
* Created on 2007年5月24日, 下午2:13
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package helper;
import javax.swing.*;
import javax.swing.table.*;
/**
*
* @author Virlene Cheng
*/
public class TableHelper
{
/** Creates a new instance of TableHelper */
public TableHelper()
{
}
public static void clearTable(JTable table)
{
while(table.getRowCount() != 0)
{
((DefaultTableModel)table.getModel()).removeRow(0);
}
}
public static void addToTable(JTable table, Object[] objects)
{
((DefaultTableModel)table.getModel()).addRow(objects);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -