This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Implementing a Menu (Help)  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on this project (java application) that I need to add a menu that give the user a Windows feel. I added "Help" to a menu and am going to add a next layer called "About". How would I go about displaying a pop up with text explaining the program when the user clicks on the "About" (similar to what happens when a user clicks "Help-About" in a Microsoft product).
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the JDialog class. Should be just what you want. See this link from the Java Tutorial: How to Make Dialogs.
 
Rose Reid
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. This looks like it will help.
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It might be even easier to do using the JOptionPane class, with its static showMessageDialog() method.
This method enables you to quickly set up the panel you want to display, the dialog title etc. You can even set the icon that gets shown to the left, and it all gets formatted properly.
Using this method saves you having to write a custom implementation of the individual gui components and the dialog itself.
Hope that helps.
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!