基于java的连连看小程序
else { return (String.valueOf(length / 1024 / 1024) + "kb"); } } //测试 public static void main(String[] args) { JFrame jf = new JFrame("测试"); jf.setSize(300, 400); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); Dimension di = Toolkit.getDefaultToolkit().getScreenSize(); jf.setLocation((int)(di.getWidth() - jf.getWidth()) / 2, (int)(di.getHeight() - jf.getHeight()) / 2); jf.add(new LocalFile()); jf.setVisible(true); } //实现相应的tablemodel类 class LocalTableModel extends DefaultTableModel { public boolean isCellEditable(int row, int column) { return false; } } } jf.setVisible(true); } //实现相应的tablemodel类 class LocalTableModel extends DefaultTableModel { public boolean isCellEditable(int row, int column) { return false; } } }
用户评论