Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDialog

 
Friend
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic