public static void toExcel(JTable table, File file) throws IOException {
String sheetName = "Sheet1";//name of sheet
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet(sheetName);
TableModel model = table.getModel();
//Get colum name
HSSFRow row = sheet.createRow(0);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PlaySchoolClock { | |
public static void main(String[] args) { | |
new PlaySchoolClock(); | |
} | |
public PlaySchoolClock() { | |
EventQueue.invokeLater(new Runnable() { | |
@Override | |
public void run() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package test; | |
import java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; |
Hiếu Nguyễn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.Iterator; | |
import org.apache.poi.hssf.usermodel.HSSFCell; | |
import org.apache.poi.hssf.usermodel.HSSFRow; | |
import org.apache.poi.hssf.usermodel.HSSFSheet; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vtcc.antispam.hieunv.quacan; | |
import java.util.Scanner; | |
import java.util.Vector; | |
/** | |
* Created by HieuNguyen on 02/20/2017. | |
*/ | |
public class Main { | |
public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vtcc.antispam.hieunv.latgach; | |
import java.util.Arrays; | |
import java.util.Scanner; | |
/** | |
* Created by HieuNguyen on 02/21/2017. | |
*/ | |
public class Main { | |
static int n, x, y, a[][], cnt; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vtcc.antispam.hieunv.latgach; | |
import java.util.Scanner; | |
/** | |
* Created by HieuNguyen on 02/26/2017. | |
*/ | |
public class Runner { | |
static int s, x, y, a[][], val = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hieunv.ltht; | |
import java.io.*; | |
import java.net.InetAddress; | |
import java.net.Socket; | |
import java.net.UnknownHostException; | |
import java.util.Date; | |
import java.util.Scanner; | |
import static java.net.InetAddress.getByName; |