我正在使用eclipse,我得到了这个错误 - 我认为这是我导入becker.robots的方式的错误 [英] I am using eclipse and i get this error--I think it's an error with the way i imported becker.robots

查看:120
本文介绍了我正在使用eclipse,我得到了这个错误 - 我认为这是我导入becker.robots的方式的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用eclipse,我收到此错误:

I am using eclipse and i get this error:

Exception in thread "main" java.lang.Error: Unresolved compilation problem:     at Wall.main(Wall.java:6)

她的屏幕截图 http://postimg.org/image/ufvv9p6aj/

以下是代码:

import becker.robots.*;
import javax.swing.*;

public class Wall
{
    public static void main (String[] args)
    {
        JFrame frame = new JFrame ();
        frame.setVisible(true);
        JPanel panel = new JPanel ();
        panel.setVisible(true);
        frame.add(panel);

        JColorChooser color = new JColorChooser();
        panel.add(color);


    }
}


推荐答案

只需创建一个新文件,然后在删除第一个未使用的导入后复制/粘贴代码。
我怀疑可能有一些特殊字符导致编译错误。

Just create a new file and copy/paste the code there after removing the first unused import. I suspect that there may be some special characters causing that compilation error.

这篇关于我正在使用eclipse,我得到了这个错误 - 我认为这是我导入becker.robots的方式的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆