Pages

Announcement...!!!

blog එක කරන්න වෙලාවක් නෑ මචංලා , Any Help - 071 910 22 06 or 077 888 21 61
 

Tuesday, July 19, 2011

අපේ Software එකට Real Date & Time එකක් දා ගමුද?

0 comments
ඔන්න යාලුවනේ තවත් මම පොඩි ගැජමැටික් එකක් අරන් ආවා....

මෙහෙමයි වෙන්නේ.....
මම මේ පහලින් දාලා තියෙන Cord එක ඔයාලගේ  Frame එකේ  initComponents වලට දාන්න...මතක ඇතුව ඔයාලගේ  jLabe  එකේ Name එක දෙන්න හරිද... :D :D

{EX : මම නම් දීලා තියෙන්නේ  jLabel9 කියලා }
...කරලම බලන්නකෝ.....
===========================
Cord
===========================

new Thread(new Runnable() {

            public void run() {
                while (true) {
    Date d = new Date();
String date = d.toString();
String ar[]= date.split(" ");
jLabel9.setText(ar[3]+" , "+ar[1]+" , "+ar[2]+" , "+ar[5]);

}
            }
        }).start();

Thnx....

0 comments:

Post a Comment

මෙම ලිපිය ගැන ඔයාලට හිතෙන කැමති දෙයක් කියන්න..