wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes white spaces is not trim if shift +space+space+space+space is being press on textarea help thanks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "white spaces is not trim if shift +space+space+space+space is being press on textarea help thanks " Watch "white spaces is not trim if shift +space+space+space+space is being press on textarea help thanks " New topic
Author

white spaces is not trim if shift +space+space+space+space is being press on textarea help thanks

chrstian ferma
Ranch Hand

Joined: Mar 26, 2014
Posts: 67

Good day here's the sample input

valid.

test1
"1 line space"
test1
output:
test1

test1


Invalid

test1
"enter"
"shift+space+space+space+space" test1
output:
test1

"shift+space+space+space"test1 doesnt trim the shift space space space space

but if you not pressing the shift space space space space just enter and space space without holding the shift it will trim the spaces the only allowing 1 line space and trims white spaces , scenario it's not trimming the spaces it you press shift +space+space+space+space+space thank you
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18650
    
    8

This "textarea" is a JTextArea? (You posted in the Swing etc. forum so I assume that's what you meant.) If so then I don't understand the question because a JTextArea doesn't trim any whitespace.
chrstian ferma
Ranch Hand

Joined: Mar 26, 2014
Posts: 67

thank you this one is already solved
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39393
    
  28
And what was the solution? I don't think shift‑space counts as whitespace.
chrstian ferma
Ranch Hand

Joined: Mar 26, 2014
Posts: 67

the solution that i found was not related on my post , i change the regular expression that im using and then it solves
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39393
    
  28
Thank you for telling us.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: white spaces is not trim if shift +space+space+space+space is being press on textarea help thanks