Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Popup window  RSS feed

 
Iqbal Mohiuddin
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

How to display tool tip kind of window, similar to the one that will appear in MS office products which we call it as office assistant. It looks like a tip of the day window. This i wanted to display on click of an object.

Your ideas will be of great help to me.

Thanks in anticipation...
Iqbal.M
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The simplest way to do it is to call the setToolTipText() method for any GUI component and supply it with the string you want to describe this component. The tool tip appears when you hover over the component

For a bigger window, you could call a dialog: http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html

You could also use a JPopupMenu. This can be called at the click of a button or other component and has the advantage that it disappears on its own when the user clicks somewhere else.

Finally, the tip of the day in a Java app that I use every day appears to be a JFrame in its own seperate window
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!