Where you put your code is dependant on what it will be used for.
I never put all my code in as files/frames.. If I have a button for example which I will never have to change, it's preferable to put the code in there if you know you're never going to need to modify it.