Catersa
Catersa

Reputation: 125

Trying to get inner text from GWT Label

I have defined a label with Java GWT.

Label a = new Label();

And assigned a value from a List called resultlist:

a.setText(resultlist.get(1));

Now, i want to get access to what's inside the label. The label itself it is inside a Html Layout Container. To access the label I have the following code line which is inside a click event:

Label label = (Label) event.getSource();

"label", contains the following :

 <div class="btext" style="width: 250px; cursor: pointer;">BASIC Feb 2014</div>

And i want to get access to "BASIC Feb 2014", capture it and store it into a variable for later use.

Anyone can enlighten me?

Thanks

Upvotes: 0

Views: 355

Answers (1)

Thomas Broyer
Thomas Broyer

Reputation: 64561

Could it be as simple as label.getText() ?

Upvotes: 1

Related Questions