I can't edit the generated code for the GUI.. I can add actions and things like that. But I can't edit a particular generated part of the code concerning the GUI. On way of do it is to add a button and when the user push the button then:
Code:
label.setText("The number is: " +num);
But what I am actually trying to do is a Math game with interface. So a question of the format:
If you get 25% discount for a t-shirt which it cost $60 how much will you pay?
Code:
label.setText("If you get " +num1 "% discount for a t-shirt which it cost $" +num2 " how much will you pay?);
Note: num1 and num2 are random generated numbers. So I need and I know how to generate 2 numbers. Add them on the label each time is executed. Calculate the result and finally check the user input if it's right to give him points.
The problem is that I can edit directly the text of the label and I don't want a user to click on a button to see the text because this is horrible :P. I want the text to be generated with the random numbers each time the Pane is executed.
Code:
_________________________________________________________________________________
| |
| If you get 25% discount for a t-shirt which it cost $60 how much will you pay? |
| ______ _____________ |
| Answer: |______| |Next Question| |
| ------------- |
|_________________________________________________________________________________|
Something like that