Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7435681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:06:56+00:00 2026-05-29T10:06:56+00:00

This is about a Netbeans 7.1 platform app. Following this tutorial I added the

  • 0

This is about a Netbeans 7.1 platform app. Following this tutorial I added the following to the code of my NodetreeTopComponent, in order to change the context-menu:

 @Override
public Action[] getActions() {
    return new Action[] {new MyAction()};
}

private static class MyAction extends AbstractAction {

   public MyAction () {
    putValue (NAME, "New Whatever");
}

@Override
public void actionPerformed(ActionEvent e) {
    NewWhateverTopComponent nk = new NewWhateverTopComponent();
    nk.setVisible(true);
}

}

Unfortunately, this does exactly nothing. Right-clicking any node in my tree i still get just the default Menu (Copy, Properties). What have i overseen?

Thank you for any suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:06:57+00:00Added an answer on May 29, 2026 at 10:06 am

    …I added the following to the code of my NodetreeTopComponent…

    You need to override the getActions() method of your Node not your TopComponent. In the tutorial that you linked to refer to the section titled Actions and Nodes. Step one states:

    Override the getActions() method of EventNode as follows

    I believe this is where you’ve gone askew.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been following the 'Netbeans E-Commerce tutorial', and have am currently on this step:
For starters, this question is not so much about programming in the NetBeans IDE
This is about a web app that serves images. Since the same request will
I'm using NetBeans and PHP. For example, I insert this code: <?php try {
Note that this is not about auto-completion or the excellent code formatter, Alt+Shift+F which
netbeans platform has proved to be most useful for large applications. But what about
I just noticed this about a week ago. I'm storing data about the current
The MySQL 5.4 documentation, on Optimizing Queries with EXPLAIN , says this about these
This is about when a .NET remoting exception is thrown. If you take a
This is about a school assignment so I'm trying to do things by the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.