Results 1 to 3 of 3
  1. #1
    davisburns is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default 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?

  2. #2
    davisburns is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default

    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.

  3. #3
    davisburns is offline Member
    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    Default

    another Update: Well, the problem was actually a null pointer, caused by the accidental Uppercase letter in an image file name lol. For some reason, this allowed the program to run in netbeans. The program runs fine now

Similar Threads

  1. Getting rid of commas in large numbers?
    By wwuster in forum Advanced Java
    Replies: 12
    Last Post: 03-05-2012, 10:35 AM
  2. inputting large numbers into java
    By imorio in forum New To Java
    Replies: 9
    Last Post: 12-26-2010, 01:59 PM
  3. crunching large numbers
    By aaroncarpet in forum Advanced Java
    Replies: 26
    Last Post: 11-30-2009, 02:10 AM
  4. Crunching large numbers part II
    By aaroncarpet in forum Advanced Java
    Replies: 0
    Last Post: 11-28-2009, 05:34 AM
  5. Loading large images in JavaME
    By b12 in forum Advanced Java
    Replies: 1
    Last Post: 04-01-2009, 11:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •