Topic: 请教一下,程序运行不了,真。(ColoredTriangle)

  Print this page

1.请教一下,程序运行不了,真。(ColoredTriangle) Copy to clipboard
Posted by: zenghua2010
Posted on: 2005-12-01 09:53

帮我看下下面的程序应该怎样改才可以运行,谢谢!

import java.awt.*;
import javax.swing.*;
import java.io.*;
public class TriangularCat1{
public static void main(String[] args) throws IOException{
ColoredTriangle body=new ColoredTriangle(
new Point(20,110),new Point(190,150),
new Point(190,65),Color.BLACK);
JFrame window=new JFrame("Triangular cat");
window.setSize(285,250);
window.setVisible(true);
Graphics g=window.getGraphics();
System.out.print("Enter any key when ready");
System.in.read();
body.paint(g);
}
}



请尽量使用准确的文字描述作为标题

若新帖再無恰当标题,可能会被刪除

原來的标题:
请教一下,程序运行不了,真。。。

2.Re:请教一下,程序运行不了,真。(ColoredTriangle) [Re: zenghua2010] Copy to clipboard
Posted by: why
Posted on: 2005-12-01 11:58

You could tell what's wrong from the compile error message...

Where's ColoredTriangle?
(If you don't have it, grap one from http://www.cs.virginia.edu/javaprogramdesign/code/1.5/ch05/ColoredTriangle.java )

3.Re:请教一下,程序运行不了,真。(ColoredTriangle) [Re: zenghua2010] Copy to clipboard
Posted by: zenghua2010
Posted on: 2005-12-01 15:03

谢了,朋友。有问题再请教你哦,呵呵!

4.Re:请教一下,程序运行不了,真。(ColoredTriangle) [Re: zenghua2010] Copy to clipboard
Posted by: zmj888
Posted on: 2005-12-04 20:55

你也在学java program design教程阿?me too


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923