Pages

Subscribe:

Ads 468x60px

♪ ♥ Get Paid Daily - The Best Sites PTC ♥ ♪
DonkeyMails.com: No Minimum Payout
AyuWage Services - Get Paid to Visits Sites and Complete Surveys

Kamis, 06 September 2012

Contoh Progam Java CountDownDUI


Progam Java CountDownDUI menggunakan Java JCreator.

import javax.swing.*;
import java.awt.*;
class CountDownGUI extends JFrame
{
JLabel label;
CountDownGUI(String title)
{
super(title);
label = new JLabel("Start count!");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
getContentPane().add(new Panel(), BorderLayout.WEST);
getContentPane().add(label);
setSize(300,300);
setVisible(true);
}
void startCount() {
try {
for (int i = 10; i > 0; i--)
{
Thread.sleep(1000);
label.setText(i + "");
}
Thread.sleep(1000);
label.setText("Count down complete.");
Thread.sleep(1000);
} catch (InterruptedException ie) {
}
label.setText(Thread.currentThread().toString());
}
public static void main(String args[])
{
CountDownGUI cdg = new CountDownGUI("Count down GUI");
cdg.startCount();
}
}

Output :

Artikel Terkait :


0 komentar:

Posting Komentar

Please Give Your Feedback Or Message.
Thank You!!?

Unique 1:1 Traffic Exchange

♪ ♥ Ma liste de blogs ♥ ♪

♪ ♥ Please Votes! Thanks. ♪ ♥
×