netBeans错误报告(未提供详细信息)

时间:2013-09-30 09:35:41

标签: java netbeans

当我运行下面的程序时,netBeans报告“一个或多个项目编译时出错”,但没有说明这些错误是什么。然而,它继续说构建成功并且根据需要绘制贝塞尔曲线。有没有人知道a)在报告有错误的决定背后的想法是什么,但没有说明错误是什么? b)如何找出错误是什么?

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package curve2;

/**
 *
 * @author User
 */
import java.awt.*;
    import java.util.*;
    import java.awt.geom.Point2D;
    import java.awt.geom.CubicCurve2D;
        import org.jfree.ui.ApplicationFrame;

public class Curve2 extends ApplicationFrame {
        // Set control points
        private int x1 = 200;
        private int y1 = 200;

        private int ctrlx = 300;
        private int ctrly = 300;

        private int x2 = 300;
        private int y2 = 500;

        // Construct frame
        public Curve2() {
              super("First Bezier Curve");
        setSize(600, 600);
            //centre();
            setVisible(true);
        }

        public void paint(Graphics g) {
            // Set points
            Point2D.Double P1 = new Point2D.Double(50, 75); // Start Point
        Point2D.Double P2 = new Point2D.Double(150, 75); // End Point
            Point2D.Double ctrl1 = new Point2D.Double(80, 25); // Control Point 1
            Point2D.Double ctrl2 = new Point2D.Double(160, 100); // Control Point 2


            CubicCurve2D.Double cubicCurve; // Cubic curve

            cubicCurve = new CubicCurve2D.Double( P1.x, P1.y, ctrl1.x, ctrl1.y, ctrl2.x, ctrl2.y, P2.x, P2.y);

            Graphics2D g2 = (Graphics2D)g;
            g2.draw(cubicCurve);
        }

0 个答案:

没有答案