Book Image

Vaadin 7 Cookbook

Book Image

Vaadin 7 Cookbook

Overview of this book

Table of Contents (19 chapters)
Vaadin 7 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. Create a Vaadin project with a main UI class named Demo:

    public class Demo extends UI {…}
  2. We create a class named ReadIt that is based on HorizontalLlayout:

    public class ReadIt extends HorizontalLayout {…}
  3. We will use two text areas. The first one is for the editor...