I have just started making a new program. I barely have any code, and when I load it the frame is clear for like 20 seconds and then it loads what goes into the frame. why does it take so long to load? I have another code that I tested (just to make sure my comp wasn't lagging) and that one loads quickly. It has more code. Can anyone please explain this to me? Thanks.
sirlink99 56 Practically a Master Poster
Recommended Answers
Jump to Postcan't explain any of that .. maybe when you show us your code, we'll be able to 'shine a light' on it, but just out of the blue ... nope, can't help you there.
Jump to Postwhen I load it the frame is clear for like 20 seconds
Probably the Thread.sleep(20000); statement.
Take that out it will speed up.
Jump to Postprivate FallMenu fm = new FallMenu(); private FallGame fg = new FallGame();
Comment out these two constructor calls and see how long it takes.
Jump to PostUse netbean IDE 7.0/6.9.1/6.8...
and use the java swing window.
Then the program will be much easier and it will run quickly.what kind of nonsense is this??? "the program will be much easier"???
let me just assume you intended to say: "programming the code will be much easier, because …
Jump to PostHave you tried taking out the repaint() call? I can't see why you would need that in your constructor.
You may also want to use requestFocusInWindow() instead of grabFocus().
All 17 Replies
stultuske 1,116 Posting Maven Featured Poster
NormR1 563 Posting Sage Team Colleague
mKorbel commented: good joke +1 +8
sirlink99 56 Practically a Master Poster
mKorbel 274 Veteran Poster
NormR1 563 Posting Sage Team Colleague
sirlink99 56 Practically a Master Poster
\007 7 Junior Poster in Training
Anuradha Mandal -28 Junior Poster
Ezzaral commented: Will you please stop posting nonsense you know nothing about. -3
sirlink99 56 Practically a Master Poster
NormR1 563 Posting Sage Team Colleague
stultuske 1,116 Posting Maven Featured Poster
sirlink99 56 Practically a Master Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Anuradha Mandal commented: Just stop it .If I do wrong , please then correct me, but dont insult. +0
peter_budo commented: Equalizer +16
sirlink99 56 Practically a Master Poster
NormR1 563 Posting Sage Team Colleague
NormR1 563 Posting Sage Team Colleague
mKorbel 274 Veteran Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.