Java关于JLabel 文字设置 10
staticclassPoliceimplementsRunnable{privateObjecthostage=newObject();privateObjectmon...
static class Police implements Runnable {
private Object hostage = new Object();
private Object money = new Object();//In this case, there are two object, hostage and money held by the thief and police.
private static boolean police = false;
private String policesay = new String("Give me the person!");
@Override
public void run() {
do {
System.out.println(policesay);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
} while (police == false);
Thief.thief = true;
}//use do-while loop to keep the two object continue running.
}
求教如何把这一part的output设置成JLabel的Text~~在线等,挺急的(┬_┬)。。 展开
private Object hostage = new Object();
private Object money = new Object();//In this case, there are two object, hostage and money held by the thief and police.
private static boolean police = false;
private String policesay = new String("Give me the person!");
@Override
public void run() {
do {
System.out.println(policesay);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
} while (police == false);
Thief.thief = true;
}//use do-while loop to keep the two object continue running.
}
求教如何把这一part的output设置成JLabel的Text~~在线等,挺急的(┬_┬)。。 展开
1个回答
2015-06-09
展开全部
楼主,part的output
在哪定义的呢?是System.out.println的output? 那把JLabel传递到这个类里面
在哪定义的呢?是System.out.println的output? 那把JLabel传递到这个类里面
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询