Java NetBeans平台提要阅读器教程

Java NetBeans平台提要阅读器教程,java,netbeans,rss,feed,Java,Netbeans,Rss,Feed,我正在做这个Netbeans教程,我被这部分卡住了。() 以下是我为实现的类编写的代码: package org.myorg.feedreader; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the e

我正在做这个Netbeans教程,我被这部分卡住了。()

以下是我为实现的类编写的代码:

package org.myorg.feedreader;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences;
import org.openide.windows.TopComponent;

/**
 *
 * @author Kidnapinn
 */
@TopComponent.Description(
        preferredID = "FeedTopComponent",
        persistenceType = TopComponent.PERSISTENCE_ALWAYS)
@TopComponent.Registration(
        mode = "explorer", 
        openAtStartup = true)
@ActionID(
        category = "Window", 
        id = "org.myorg.feedreader.FeedTopComponent")
@ActionReferences({
    @ActionReference(
        path = "Menu/Window", 
        position = 0)
})
@TopComponent.OpenActionRegistration(
        displayName = "#CTL_FeedAction")
@Messages({
    "CTL_FeedTopComponent=Feed Window",
    "HINT_FeedTopComponent=This is a Feed Window"})
private FeedTopComponent() {
    setName(Bundle.CTL_FeedTopComponent());
    setToolTipText(Bundle.HINT_FeedTopComponent());
}
public class FeedTopComponent extends TopComponent {

}
我在Java是一个呆子,所以我不知道我做错了什么。
您能帮我吗?

将“NbBundle”添加到您的导入中:

import org.openide.util.NbBundle.*;
这对我有用。您可能需要将“基本实用程序API”作为依赖项添加到FeedReader模块中。(项目属性、库、模块依赖项、添加依赖项;);。 教程中的某个地方显然存在错误,因为此解决方案依赖于不推荐的导入,但现在应该运行它