I’d like to make an auto-hide the JToolBar and it appear only when the mouse goes near/over the JToolBar. I have added the JToolBar in JPanel. There is no mouseover listener in JToolBar. How to do this?
I’d like to make an auto-hide the JToolBar and it appear only when the
Share
Add a
MouseMotionListenerto yourJFrameorJDialog.In that way, the tool bar will only be shown if the mouse is in the top 10 vertical pixels of the window.