找不到符号:org.jfree.chart.LegendItem 中的 LegendItem()

发布于 2024-10-07 03:20:11 字数 817 浏览 5 评论 0原文


我在我的 java 程序中使用以下行

LegendItem item1 = new LegendItem("US", "US", "US", "US",
                new Rectangle(10, 10), new GradientPaint(0.0f, 0.0f,
                new Color(16, 89, 172), 0.0f, 0.0f, new Color(201, 201, 244)));

and using "jfreechart-1.0.13.jar" file and getting this error
cannot find symbol
  symbol:   constructor LegendItem(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.awt.Rectangle,java.awt.GradientPaint)
  location: class org.jfree.chart.LegendItem

but in the jar file in class org.jfree.chart.LegendItem.class i have seen the constructor with the parameters i am using.
i am using net beans6.9.1 ide . i am not able to find the reason for this.
if any one can help me please

Thanks
Yugal

i using the following line in my java program

LegendItem item1 = new LegendItem("US", "US", "US", "US",
                new Rectangle(10, 10), new GradientPaint(0.0f, 0.0f,
                new Color(16, 89, 172), 0.0f, 0.0f, new Color(201, 201, 244)));

and using "jfreechart-1.0.13.jar" file and getting this error

cannot find symbol
  symbol:   constructor LegendItem(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.awt.Rectangle,java.awt.GradientPaint)
  location: class org.jfree.chart.LegendItem

but in the jar file in class org.jfree.chart.LegendItem.class i have seen the constructor with the parameters i am using.
i am using net beans6.9.1 ide . i am not able to find the reason for this.
if any one can help me please

Thanks
Yugal

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

阳光下的泡沫是彩色的 2024-10-14 03:20:11

编译&执行良好,使用 jfreechart-1.0。 3.jar 在类路径中

import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Rectangle;
import org.jfree.chart.LegendItem;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        LegendItem item1 = new LegendItem("US", "US", "US", "US",
                new Rectangle(10, 10), new GradientPaint(0.0f, 0.0f,
                new Color(16, 89, 172), 0.0f, 0.0f, new Color(201, 201, 244)));

        System.out.println(item1.getSeriesIndex());
    }
}

Compiles & Executes fine , with jfreechart-1.0.3.jar in classpath

import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Rectangle;
import org.jfree.chart.LegendItem;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        LegendItem item1 = new LegendItem("US", "US", "US", "US",
                new Rectangle(10, 10), new GradientPaint(0.0f, 0.0f,
                new Color(16, 89, 172), 0.0f, 0.0f, new Color(201, 201, 244)));

        System.out.println(item1.getSeriesIndex());
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文