Babi Astimal Astimal wrote:can you explain the use of breck in your code ?
The loop tries each regex in order. When you find a regex that matches then none of the remaining regexs can possibly match so there's no point in checking them. Break causes loop to abort because we already found one.
I'm assuming that JTextArea has some setText() method. Have you tried that?
Please TellTheDetails (that's a link) of the problem you're having. I'm assuming you're writing a Swing program. Have you written one before? What resources and tutorials have you looked into? Have you looked at this:
Just copy and paste it into your class, like it was a method. I usually put them at the bottom, some people put them at the top, but anywhere will do.
All things are lawful, but not all things are profitable.
Babi Astimal Astimal
posted 5 hours ago
I have this message fault error:
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException
at java.util.regex.Pattern.<init>(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
sorry I have to put the whole code thanks to correct me :