If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Simple question I DON'T know the answer to

Hello everyone. This is my first post also my first question. I just started using Java about three months ago. So far I've really only done the basics. Still trying to learn it. Anyway, on with the question.

For my java class I have built a simple program to genreate a random number and then display the number. NOW I am charged with the task of building a GUI interface for this small program. I have already built the interface but I cannot for the life of me figure out the syntax involved in calling my custom number class and displaying the result on a canvas in my GUI program.

Could you be a bit more specific as to how you want to display the random number ? If your GUI has a TextField or JTextField, Label or JLabel you can easily display it there. Or were you looking at an alert-type of display ?

Thank you for the replies guys. From reading your posts I got the idea to use a text field instead of the canvas and now it works. It seems that its a LOT easier to use the text field than the canvas. Anyway Thanks again guys.