Professional Documents
Culture Documents
String roar;
This is in this box that we will store the roar that the user will write
@Override
protected void onMain_TextAreaAction(Component c, ActionEvent event) {
roar = findTextArea().getText();
We put in the box roar what the user has typed in the TextArea
that we have added to the designer (watch the video !)
@Override
protected void onMain_ButtonAction(Component c, ActionEvent event) {
What is roar here?
It is the content of
this box
value
Boring ?
Difficult ? No, I
just did a copy
/ paste from
the Codename
One
documentation
This creates a
ConnectionRequest object and
we put it in the box request .
Then between the green curly
braces, we have strange lines of
code, which basically prepare
infoInString to be sent to Internet.
NetworkManager.getInstance().addToQueueAndWait(request);
}
If you think these lines of code are particularly hard to understand, and certainly cant be
memorized, I agree with you. Coders dont learn that by heart. You read the documentation of
Codename One, copy the code you need into your app, and do one or two adjustments to
adapt the code to your particular needs. Thats how I did it here.
Clment Levallois