I do simple alarm and i need show alert if value from column 0 == today.
Calendar cal = new GregorianCalendar();
int day = cal.get(Calendar.DAY_OF_MONTH);
try {
File currDir= new File ("Baza.db");
String sc = currDir.getAbsolutePath();
sc = sc.substring(0, sc.length());
String url = "jdbc:sqlite://"+sc;
Connection conn = DriverManager.getConnection(url);
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT Day FROM Month");
jTable1.setModel(DbUtils.resultSetToTableModel(rs));
if(jTable1.getValueAt(0, 0).equals(day)){
JOptionPane.showMessageDialog(null, "Do your question!");
}
} catch (SQLException e) {
JOptionPane.showMessageDialog(null, e);
}
I trying use method getColumn, getColumnModel and getSelectedColumn but but nothing compared my calculations..