How to add button/icon with action in status bar?


Is it possible to add button on status bar and apply action on it?

if it is.. how to get statusbar and add component in it?

help me plz.

1 comment

You can add any JComponent to the status bar using following code:

statusBar = WindowManager.getInstance().getStatusBar(project);
statusBar.addCustomIndicationComponent(any JComponent);

I don't know if that is possible to apply idea action on that but you can of course add standard listener to the JComponent.
I tested it with clickable Icon and it works fine.


Please sign in to leave a comment.