Auto import

Last modified: 07 March 2023

If you're using a class, a static method, or a static field that you haven't imported yet, the IDE shows you a tooltip prompting to add a missing import statement so that you don't have to add it manually. Press to accept the suggestion.

If there's more than one possible source of import, pressing will open the list of suggestions.

https://resources.jetbrains.com/help/img/idea/2023.1/auto-import.png
Gif

To change the background color for import tooltip, press and go to Editor | Color Scheme | General | Popups and Hints | Question hint.