Results 1 to 3 of 3
- 02-25-2011, 12:03 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
Problems loading large numbers of files
the game that I wrote uses 2 different JFrames: A title/menu Frame, and the game Frame. The title frame uses about 25 different images, most of them relatively small(Just the size needed for a button). On the game board, however, I use about 45 images, some of them larger (400 x 550 pixels). The game compiles and runs just fine. It has a small lag when it has to load the files, but that's expected. The real problem comes when I go to build the project from netbeans, however. The title/menu frame loads and runs fine, but when I click the "new game" button, which ordinarily opens up the game frame and closes the menu, nothing happens. I checked my system memory and saw that the computer had allocated memory for the program every time I clicked the button, but never created the JFrame. I made a small sample program that loads all of the same images but doesn't show them, and that program didn't work either. I cut the number of image imports in half and rebuilt, and it ran the first time. What is going on?
- 02-25-2011, 03:39 AM #2
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
Update: adding a main method and running the malfunctioning Frame by itself causes the program to launch but never show, then quit a few seconds later.
- 02-25-2011, 04:13 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Getting rid of commas in large numbers?
By wwuster in forum Advanced JavaReplies: 12Last Post: 03-05-2012, 10:35 AM -
inputting large numbers into java
By imorio in forum New To JavaReplies: 9Last Post: 12-26-2010, 01:59 PM -
crunching large numbers
By aaroncarpet in forum Advanced JavaReplies: 26Last Post: 11-30-2009, 02:10 AM -
Crunching large numbers part II
By aaroncarpet in forum Advanced JavaReplies: 0Last Post: 11-28-2009, 05:34 AM -
Loading large images in JavaME
By b12 in forum Advanced JavaReplies: 1Last Post: 04-01-2009, 11:02 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks