Capturar a data e mostrar numa jlabel

1 resposta
R

Eai pessoal. Beleza?

Alguem sabe como capturar a data do pc e colocar em mostrar em uma jlabel?

Valew.

1 Resposta

thokk

De uma olhada neste codigo!

Calendar f=Calendar.getInstance();
String hora=f.get(java.util.Calendar.HOUR_OF_DAY)+":"+f.get(java.util.Calendar.MINUTE)+":"+f.get(java.util.Calendar.SECOND);
JLabel h=new JLabel(hora);
Criado 26 de outubro de 2006
Ultima resposta 26 de out. de 2006
Respostas 1
Participantes 2