This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JDialog" Watch "JDialog" New topic
Author

JDialog

Friend
Ranch Hand

Joined: Nov 23, 2000
Posts: 67
Can we insert a variable value in JOptionPane INFORMATION_MESSAGE dialog?
eg: count=1;
JOptionPane opt=new JOptionPane("+count",INFORMATION_MESSAGE);
Please.......
Thank you.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
As long as the first parameter is an object you can.
int count = 1;
String message = "The count is " + count;
JOptionPane opt=new JOptionPane(message, INFORMATION_MESSAGE);

"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: JDialog
 
It's not a secret anymore!