Upcoming NetBeans Feature: Generate Implementing/Extending Class!

Another upcoming NetBeans IDE feature, already in the daily builds, is this hint, which appears when you put the cursor in a class declaration:


When the hint is invoked, the new class, with all its required methods, is automatically generated, as a separate class (a dialog pops up letting you specify the name of the class and the package where the class should be created).

How handy these small enhancements can be!

This particular enhancement was included for 7.2 specifically because of a remark Arun Gupta made during Devoxx last year. That small discussion in a hallway resulted in this issue being highlighted and implemented:


Just pointing this out as yet further evidence that we're really listening to users and, between balancing the various requirements coming in from various sides, are making very sure that user requests are taken extremely seriously.


Haha, it was request by me, 6+ years ago.

Thank you, NetBeans team. Always!

- pprun

Posted by guest on January 30, 2012 at 10:39 PM PST #

Oh, this is great. This is a wonderful feature. I can really put this to good use because I have many abstract classes this year.


Posted by johnstosh on February 28, 2012 at 06:29 PM PST #

"Implement Abstract Class" should be "Extend Abstract Class" isn't it?

Posted by Ramesh on March 11, 2012 at 04:35 AM PDT #


I'm learning Swing, before trying JavaFX (oooooooooh:) total noob, but got the thirst. Maybe PHP after this. Maybe node.js!

Anyway, nearly every tutorial I watch employs Eclipse, which has a nifty superclass entry (which you can add, like JPanel), to save ya typing 'extends ...' with every definition of every generation of every class...

Does NetBeans let me create a class 'that inherits...', or do I have to keep extending and importing?


Posted by Jonny on August 12, 2015 at 07:54 AM PDT #

If you have a hard time typing the characters "extends", you're going to have a really hard time creating meaningful applications, I think. Plus, heaps of tutorials on YouTube that use NetBeans, even complete courses you can find there that use NetBeans.

Posted by Geertjan on August 12, 2015 at 07:56 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« November 2015