• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

SOLVED Java NetBeans, :( I need help!

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.
I have a Java NetBeans problem too!

I am absolute beginner - so I am not writing original code. I am trying to carefully follow step by step a tutorial from netbeans.org.

I have the new IDE 8.1 and the lesson says it is for 8.1.
I have JDK 1.8.0.73

This is a make a toolbar exercise and I get through it about 85% with no big errors .... then at one spot I get a mass of red dots showing errors.

This is the lesson -
http://platform.netbeans.org/tutorials/nbm-google.html#creating-module-project
it goes off the rails at step 5 of
Creating the Toolbar
(inserting that bold text squib).

What I am thinking is maybe it doesn't like this line ....
@ActionID

maybe there's a different symbol or text I am supposed to put in place of the @ sign.

It has an error warning but ALT+ENTER doesn't give me a fix.

[I have done another lesson before with CODE WARRIOR and know about JLabel and the JTextFields etc. so they go in OK. ]
Is it me? I think that part in STEP 5 must have some little error .
I have turned OFF my IDE updater. But the tutorial doesn't look like it was written last week.

I am just stuck. 2 days of spinning wheels. :bang head
 
Last edited:
Rats. I think because this thread says 'SOLVED' at the top I am not going to get an answer.
But I didn't want to make a new topic on the forum where there already was one.
 
Well, I think I solved my problem after a re-do.
I made a new folder and redid the lesson and had a problem at the same part.

I wound up copying the code from the lesson and inserting it into the java file since the instructions were very unclear.
The problem seems to be on this line (near the top)
import org.openide.util.actions.Presenter;

There was an error dot on the left side of that line I hadn't seen. On prompt the IDE said to get that file and the error was gone after that and it ran OK. :p

-------------------------
Part 7 of "Creating the Action" seems poorly written compared to the lesson up to that point. There's no way to follow that instruction as a beginner. The prior part of the lesson had step-by-step illustrated instructions. Then, BLAM,
...you need to implement Presenter.Toolbar in the ActionListener you created earlier, in order to display the JPanel in the toolbar. Change the signature of Open GoogleActionListener.java. so that Presenter.Toolbar is implemented. When using Presenter.Toolbar, you need to extend AbstractAction, instead of implementing ActionListener. Also, you can delete the "iconBase" attribute (as well as the icons from the source tree) because you no longer need an icon in this scenario.​

The 2 "you need to" items are just a mystery without details.
 
Back