Have you compiled mywork.java and get mywork.class ? I can compile your code and get right result! But , by the way you made a mistake to use this: for (int x = 0 ; x < size().height ; x++) { g.drawString("欢迎来到Java世界!", 10, x*15); } Some output will not be visible.
我用JB2写的程序,启动就花了好几分钟!!!(win98)如果你觉得太快,9成9是没有运行或出错。
catch(InterruptedException e){}
I can compile your code and get right result!
But , by the way you made a mistake to use this:
for (int x = 0 ; x < size().height ; x++)
{
g.drawString("欢迎来到Java世界!", 10, x*15);
}
Some output will not be visible.