主题:[讨论]jtable removeRow
public void closeAll()
{
for(int i=model.getRowCount()-1;i>=0;i--)
{
model.removeRow(i);
}
void stop_actionPerformed(ActionEvent e)
{
try {
sendClients(new String("QUIT:" + "SERVER"));
closeAll();
System.out.println("zaogao "+model.getRowCount());
//model.removeRow(0);
if(serverSocket!=null)
{
serverSocket.close();
serverSocket = null;
}
jbtStart.setEnabled(true);
jtaInfo.append("系统消息: 服务器 服务器关闭\n");
} catch (IOException ex) {
Logger.getLogger(ChatServer.class.getName()).log(Level.SEVERE, null, ex);
}
}
输出
zaogao 0
为什么显示为
不是应该没有这一空行吗
不是应该一行都没有吗
{
for(int i=model.getRowCount()-1;i>=0;i--)
{
model.removeRow(i);
}
void stop_actionPerformed(ActionEvent e)
{
try {
sendClients(new String("QUIT:" + "SERVER"));
closeAll();
System.out.println("zaogao "+model.getRowCount());
//model.removeRow(0);
if(serverSocket!=null)
{
serverSocket.close();
serverSocket = null;
}
jbtStart.setEnabled(true);
jtaInfo.append("系统消息: 服务器 服务器关闭\n");
} catch (IOException ex) {
Logger.getLogger(ChatServer.class.getName()).log(Level.SEVERE, null, ex);
}
}
输出
zaogao 0
为什么显示为
不是应该没有这一空行吗
不是应该一行都没有吗