Rickard
What you may be referring to is an auto-complete textbox. You don't need any netbeans specific code to do this. Look at the links below.
autocomplete JTextField for netbeans
http://ubuntuforums.org/showthread.php?t=1124992
If you want Java API Lookup for a text field I think you might have to integrate the CodeCompletionProvider with your code and then call that provider from your textbox Keyboard Event Handler.
https://platform.netbeans.org/tutorials/nbm-code-completion.html