I've developed an application using netbeans that needs to load and display images.

I use netbeans Clean and Build function to create an executable Jar file. When I run the executable Jar file it runs fine but when I come to a section of the application that needs images it freezes and can't load the images.

When I then return to netbeans the part of the program that did successfully run before Clean and Build doesn't work anymore and I get an error message saying Uncaught error fetching image:

I'm writing a program that needs multiple windows presenting information but want the user to be able to click the X and have just that window close and not the entire running program. Also, if the user clicks on a JButton like submit, then that window will close leaving the other windows open. Can someone tell me how do do this please

I'm writing an application that needs to display images and I'm having some problems with my images flickering. The application is a kind of e-learning tool and will have questions and answers (both represented by images). The user will be required to drag the appropriate answer image to the corresponding question.

The questions and answers are stored in 2 seperate array Lists. I have a method which runs through the arrayLists and draws each question/answer. I also have a clear screen method which just paints a background coloured rectangle over the Canvas to clear the screen. This method is called only when and image is being moved and is determined by a boolean called screenRefresh.

The 2 paint methods are called from within a thread and for some reason, when the paintQuestions and clearScreen methods are called there is some flickering in the images and I just can't seem to fix it.

if the file is in the applets jar (presuming you have jarred up your applet?), you should use this.getClass().getResource[asStream](...)

I dont have too much experience working with Jar files. Am I right in thinking that the .jar file will contain .class files and not .java files? If so, how can I modify the applet after the Jar has been created? Also, do I store the images in the Jar file?

/** mediatracker to make sure an image has been loaded */privateMediaTrackermediaTracker;/** hashtable of all loaded images keyed by image file name */privateHashtableimages;/** used for image id in the media tracker */privateintimageCount=0;

I assume the whole problem lies in the fact that it's not finding my image and so can't load it. I've put the image in the same folder and from within netbeans set the working directory to this folder in a hope that it would find and load the image.

Can someone PLEASE check my code to see if there's any fundamental problem and let me know how to fix this bug.

for some reason I put image = ImageHandler.getImage(imageName) when I should have created a new instance of ImageHander (my java lingo isn't too good, but I think that's the correct terminology). So it should have been something like:

I have to make a space invaders game and am having some problems with using images for my gaming entities. I have a GameEntites class that will be extended by AlienEntity, shot and ship. I have a class called ImageHandler that will be used to represent the entites with images. I've never used BufferImage's before and can't get it running.

I know you've probably seen this a million times before but a little help would be appreciated.

I have to make a game for a mini-project and would like to make a 2d side scroller (either platform or shooter).

I'm having problem getting my head around how to make the background and enemies to move from right to left. Can someone point me to a good step-by-step tutorial or post some simple code so I can get an idea of what's needed. Also, I've looked on amazon.co.uk for a good java gaming book but I'm not sure which is best. Can anyone recommend one.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org