Skip to main content

how can i continue coding up to the next line....

2 replies [Last post]
jeffbroodwar
Offline
Joined: 2006-11-27
Points: 0

HI,

I'm trying to call a message box, but the message that i'd like to display is too long. so i have to cut it to 3 lines.... the problem is, how can i continue to the next line without generating errors? i know that this is a basic question. please help though...... thanks.

JOptionPane.showMessageDialog("The proper READ syntax is : \n C:\ACR38_Driver.exe /ACTION=GET"
" /FILE=C:\CARDOUTPUT.dat /LOG=C:\CARDLOG.txt \n \n The proper WRITE syntax is : \n C:\ACR38_Driver.exe"
" /ACTION=PUT /PIN=FFFFFF /FILE=C:\CARDINPUT.dat /LOG=C:\CARDLOG.txt","Notice",JOptionPane.INFORMATION_MESSAGE);

Best Regards,
Jeff

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jwenting
Offline
Joined: 2003-12-02
Points: 0

yes, it's so basic any beginners' tutorial will almost certainly cover it...

Ever heard of string concattenation? If not, look it up.

jeffbroodwar
Offline
Joined: 2006-11-27
Points: 0

JOptionPane.showMessageDialog(null, "The proper READ syntax is : \n C:\\ACR38_Driver.exe /ACTION=GET"+
" /FILE=C:\\CARDOUTPUT.dat /LOG=C:\\CARDLOG.txt \n \n The proper WRITE syntax is : \n C:\\ACR38_Driver.exe"+
" /ACTION=PUT /PIN=FFFFFF /FILE=C:\\CARDINPUT.dat /LOG=C:\\CARDLOG.txt","Notice",JOptionPane.INFORMATION_MESSAGE);

The correct syntax is posted above.... C:\ shouldn't be like that when inside a double quote.. you see \ character has a special function when placed inside the double quotes.... so it should be c:\\ to make it work. Thanx to r035198x of TheScripts.com

ISSUE SOLVED !!!!!