I am currently using some images and the only way it works is if i specify the path by something like "c:\\blabla\\myimage.gif"
here is how i use it for getting an image(btw is getImage any better than createImage? I just can't se any difference)
track =...
I have got a Canvas that paints one small image(roughly 30x20) and one big image(1280x1024). The small is a car and the big is a track. Anyway, i create a JFrame and put a a JScrollPane in it and i also put the Canvas in the ScrollPane. The problem is that my JScrollPane is 1280x724 and my Image...
the following code gives me Nullpointerexception when trying to drawImage(bi, 0, 0, this)
I am trying to get Image to work before I doubleBuffer it but my createImage or getImage doesn't work(I tried both).
Which one is preferred anyway?
YES, i have put the test.gif in the same directory as...
Also, is it realistic to make a 2D-game like without the game being to slow or do I need to JCC it and compile a c-code and run it with a garbage collector?
I am counting on atleist 2GHz processors with my game which will probably be standard in 2 years when the game is ready.
Please motivate...
I am currently doing a F1-management sim in Java.
I want to be able to view the whole track or zoom in up to 500% and scroll on the zoomed in views. 100% zoom is viewing the whole track. I am currently using a JScrollpane where I will put the bitmaps.
Is that the best option?
Is there any...
I have a major bug in my program.
"Destination component not connected to component tree hierarchy"
is one message i get alot of at runtime!
It seems the first 10 seconds after i switch to a new Frame i can get this message just be moving the mouse or push the mouse buttons
I also have one major bug.
"Destination component not connected to component tree hierarchy"
is one message i get alot of!
It seems the first 10 seconds after i switch to a new Frame i can get this message just be moving the mouse or push the mouse buttons.
Has this problem anything...
I am currntly using swing components except for Frame.
I always get 2-3 flickering when I switch frame so I was wondering how to get rid of them. I basically do
blablabla.setvisible(true)
and the flickering begins when the jPanels are added to my new Frame.
In my frame I have say 4 jPanels with...
So a Thread is only ment to start() once?
Here is how I tried used it in my formula one game:
run()
{
blablabla;
blabla;
blablablabla;
"showSomeMenu"
}
so the last thing that the Thread does is starting a menu.
from that menu I want to be able to start it again because the class that...
I have a problem when i make a class that extends Thread because the first time i use start() it works but the second time it does nothing. My run() ends with an activation of a menu and from that menu i should be able to start the thread again but i can't.
Note: The second start() call is done...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.