I want to make a message allert in Java.
That's no problem for me.
But the text is pretty long, and I don't know how to make enters in Java.
So, how can I make an enter or a empty line in Java?
grtz
Jenny 6 1997
c(h)at wrote: I want to make a message allert in Java. That's no problem for me. But the text is pretty long, and I don't know how to make enters in Java. So, how can I make an enter or a empty line in Java?
grtz Jenny
If you are using Strings to display the message the thing you are
looking for is the newline character in java it is: '\n', you could do
something like:
"dear user,\nyou have just crashed the program, thank you"
the output of this would be like:
dear user,
you have just crashed the program, thank you
grtn,
Erik
c(h)at wrote: I want to make a message allert in Java. That's no problem for me. But the text is pretty long, and I don't know how to make enters in Java. So, how can I make an enter or a empty line in Java?
grtz Jenny
\n
> > I want to make a message allert in Java. That's no problem for me. But the text is pretty long, and I don't know how to make enters in
Java. So, how can I make an enter or a empty line in Java? \n
Thank you very much!
> > I want to make a message allert in Java. That's no problem for me. But the text is pretty long, and I don't know how to make enters in
Java. So, how can I make an enter or a empty line in Java? If you are using Strings to display the message the thing you are looking for is the newline character in java it is: '\n', you could do something like: "dear user,\nyou have just crashed the program, thank you" the output of this would be like: dear user, you have just crashed the program, thank you
Thank you very much!
c(h)at wrote: I want to make a message allert in Java. That's no problem for me. But the text is pretty long, and I don't know how to make enters in Java. So, how can I make an enter or a empty line in Java?
grtz Jenny
You need to use an escape character. if you have something like:
String s = new String("This is a \n short string or something.");
The output is:
This is a
short string or something.
the escape character \n produces a newline.
""c\(h\)at" <j.**************@home.nl>" wrote in comp.lang.java: I want to make a message allert in Java. That's no problem for me. But the text is pretty long, and I don't know how to make enters in Java. So, how can I make an enter or a empty line in Java?
In addition to the other responses, you can also produce an empty line
to the Console using the following code:
System.out.println();
--
Randolf Richardson, pro-active spam fighter - rr@8x.ca
Vancouver, British Columbia, Canada
Sending eMail to other SMTP servers is a privilege. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mr. x |
last post by:
Hello,
I need a script for counting the no. of enters on my site, please.
I need a check that for the same user in the same day - if the user enter
several times, it is count once
(or something...
|
by: kw |
last post by:
Hello,
I am trying to put up a page for my students for them to be able to enter
their class number into a field and instantly get a personalized text
message. (ie student number 5 enters "5"...
|
by: Adriaan van Heerden |
last post by:
hi,
I'm very new to Access and have been searching newsgroups for a few
days but can't find exactly what I need.
I want to be able to do the following:
* user enters patient's hospital number
*...
|
by: santa19992000 |
last post by:
can I use scanf to get input (some times user enters input sometimes
not, just hit keyboard)?.
It displays to enter IP address, if user wants to change, then he
enters, otherwise he hits keyboard,...
|
by: Mr. x |
last post by:
Hello,
I need a script for counting the no. of enters on my site, please.
I need a check that for the same user in the same day - if the user enter
several times, it is count once
(or something...
|
by: tcb |
last post by:
I have a RangeValidator setup for two input fields. The validator Type is set to Integer. If the user enters an alpha numeric, the validator works, however, if the user enters a space, the validator...
|
by: cb.brite |
last post by:
Hello,
I have tried this using the MouseEnter/MouseLeave events. However these
events do not really refer to the rectangular shape of the form, but
the client area (form area minus children...
|
by: rajbala |
last post by:
Hi all,
I want to restrict tomcatserver files to particularly one client that who enters username and password correctly anywhere in web(specifically in another system).But nobody...
|
by: eddy556 |
last post by:
Hey,
Im having trouble making a textbox change colour when a user enters it. I have managed to textBox2.BackColor = Color.Pink; place that in the code which seems to work but I wish for it to...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |