Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String question 1

Status
Not open for further replies.

pengifyd

Technical User
Mar 8, 2006
3
US
I just have a (easy?) quick question. I'm trying to put this string into one line and not three and I was wondering how to do that. If anyone could help it would be appreciated.


String pokerGame = (new StringBuilder()).append(" Dealer: X X\n\n X\n\n Player: ").append(d1).append(" ").append(c1).toString();
pokerGame = (new StringBuilder()).append(pokerGame).append("\n\n------------------------------------\nWhat do you want to do?\n\n Play on? (Enter 1)\n Fold? (Enter 2)").toString();
String s3 = JOptionPane.showInputDialog(null, pokerGame, "Java Poker", JOptionPane.QUESTION_MESSAGE);
 
That's my fault I wasn't that clear. The string buffer worked though, thanks :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top