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 7961899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:10:47+00:00 2026-06-04T05:10:47+00:00

I have been trying to solve this for the past 2 days with no

  • 0

I have been trying to solve this for the past 2 days with no luck. I went through pages upon pages of solutions that all look correct, but either my implementation is wrong or they aren’t they right solutions.

I have created a new Toolbar called AddEditDelete. Then I proceeded to add Actions to it:

Here is the AddAction.java

@ActionID(category = "Edit",
id = "com.waudware.toolbar.AddAction")
@ActionRegistration(iconBase = "com/demo/toolbar/icons/add.png",
displayName = "#CTL_AddAction")
@ActionReferences({
@ActionReference(path = "Toolbars/AddEditDelete", position = 1),
@ActionReference(path = "Shortcuts", name = "D-A")
})
@Messages("CTL_AddAction=Add")

public final class AddAction implements ActionListener {

    public void actionPerformed(ActionEvent e) {
        //TODO: Code here
    }
}

I also have EditAction.java and DeleteAction.java – they were all created as “Always Enabled”.

What I have been trying to do is this: When you click on the Add button on the toolbar, it will execute the code in the AddAction.java AND disable EditAction.java (Gray out the action buttons so they are unclickable).

After 2 days of trying to figure out how to do this, I am completely lost and almost sure its impossible. NetBeans dev forums have been unhelpful so far.

Edit: My question is quite specific and simple: What would be the correct (even if it is a bad practice) approach to disabling EditAction.java from AddAction.java -So far I have tried using Lookup, CookieSet, Direct calls, Action instantiation, and the only thing I got that was remotely what I wanted is

ToolbarPool.getDefault().findToolbar("AddEditDelete").setEnabled(false);

which hides the whole toolbar, but not individual actions(icons) on it.

  • 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-06-04T05:10:49+00:00Added an answer on June 4, 2026 at 5:10 am

    See Toolbar.getComponents() instead.

    Component components = ToolbarPool.getDefault().
        findToolbar("AddEditDelete").getComponents();
    for (Component component : components) {
        component.setEnabled(false);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to solve this problem all day, I googled a lot,
I have been trying to solve this problem all day but haven't got any
I have been trying to solve this problem for three days now, it's really
I am stumped. I have been trying to solve this for 2 days and
I have been trying to solve this bug for 2 days straight and can't
I have been trying to solve this problem for a while, but couldn't with
I've been tearing my hair out the past few hours trying to solve this
I have been trying to solve this problem for a while, could not find
I have been trying to solve this problem the whole day: How do I
I have been trying to solve this for 2 weeks and I have not

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.