Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Timer timer = null;
- if (timer == null) {
- timer = new Timer();
- TimerTask tarefa = new TimerTask() {
- @Override
- public void run() {
- try {
- listarmural(); //função que conecta no banco para
- //trazer informações
- } catch (Exception e) {
- }
- }
- };
- timer.scheduleAtFixedRate(tarefa, TEMPO, TEMPO);`
- while (rs.next()) {
- caixaTexto1.append("ID: " + rs.getString("idmural") + "nDATA: " + rs.getString("datahoramural") + "nTITULO: " + rs.getString("titulomural") + "nFILIAL: " + rs.getString("filial") + "nNOME: " + rs.getString("nome") + "nSTATUS: " + rs.getString("statusmural") + "nTEXTO: " + rs.getString("texto") + "n" + "_______________________________________________________________n");
- id = rs.getString("idmural");
- }
- //Notifica quando for incluído um novo mural
- if (id == null) {
- //quando não houver
- } else {
- idatual = Integer.parseInt(id);
- if (idatual > id1) {
- botao1.doClick();
- id1 = idatual;
- }
- }
- desconecta1();
- }`
Add Comment
Please, Sign In to add comment