Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JDialog" Watch "JDialog" New topic


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);
Thank you.
Cindy Glass
"The Hood"

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 agree. Here's the link:
subject: JDialog