Can you raed tihs?
It's quite common between friends and colleagues to send some funny e-mails. For example, like this:
"Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteers be at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe."
In this recipe, we will create an application that transforms text according to the mentioned rules. Then, we can also send a similar e-mail to our friends with our text .
How to do it...
Perform the following steps to create two editors that will transform the text:
Create a Vaadin project with a main UI class named
Demo
:public class Demo extends UI {…}
We create a class named
ReadIt
that is based onHorizontalLlayout
:public class ReadIt extends HorizontalLayout {…}
We will use two text areas. The first one is for the editor...