Programming is just another name for 'problem solving'.
You should learn to solve problems by yourself, only this way you will become a programmer.
You don't need to hurry, it seems that you see something strange in your code/output, and you're posting a question here seconds later. This is just WRONG.
When you've got problem, consider at least googling it first. Experiment, try to solve it somehow. Have you solved any programming problem by yourself? Have you even tried?
Because when you solve a problem by yourself, that's where the satisfaction hits. Right now you're just copy/pasting code, not programming. Many users gave you many good advices here so far, yet you seem to ignore them all, and just waiting for your programming problems to be solved by someone else. You won't get any further if you keep doing it that way.
Try not posting you problems here for a few days. and solve them on your own.
i wrote it the topic & i continue trying to to understand it i was going to see at night my understanding was right or not but now i i think i understand i take long time to understand but i think that's not problem right ?&i will try to write the code with myself it will be hard but i will write it
Best way to be sure, that you understand a piece of code, is to modify it, so it does something different. If it does what you thought it would do, you can assume that you understand that particular piece of code.
Sorry Lysy what I want to know is am I doing what you would do to create components for a UI on a game that uses a loop for updating and rendering objects to the screen. Is there another way to make UI's for this type of game since the screen is getting redrawn 60 times a second or whatever I have it limited to. I just want to know the correct way to do it.
Yeah, you're doing it right. All the elements that render on screen should be called in a game loop. I think you should also do some research on 'state machines'. You will be able to create menu, game screen and many others, and your code will stay clear and will attract females.
Also I recommend this famous article about managing game loop: