Search:

Type: Posts; User: Harrald

Page 1 of 3 1 2 3

Search: Search took 0.42 seconds.

  1. Replies
    21
    Views
    668

    Re: Need help on simple game for Practice

    The code hasn't changed from page 1, I just copied and pasted it unto page 2.

    "The logic worked the same in both I thought, just have problems with dbImage. Am I mising something?"
    Yes I saw it,...
  2. Replies
    21
    Views
    668

    Re: Need help on simple game for Practice

    Initially, but I assign it too createImage(500,500). I am starting to think that createImage is null. I'm not sure how createImage works totally, I navigated to source but it is kind of confusing.
    ...
  3. Replies
    21
    Views
    668

    Re: Need help on simple game for Practice

    dbImage is the variable that is null, even right after the assign statement it is still null.

    The logic worked the same in both I thought, just have problems with dbImage. Am I mising something?
  4. Replies
    21
    Views
    668

    Re: Need help on simple game for Practice

    Here is the code for my 3 classes:


    package bandits;

    import javax.swing.JFrame;



    public class Bandits extends JFrame {
  5. Replies
    21
    Views
    668

    Re: Need help on simple game for Practice

    run:
    in loadArrays(): i = 0
    DBImage is still null!
    in loadArrays(): i = 1
    java.lang.NullPointerException
    DBImage is still null!
    java.lang.NullPointerException
    DBImage is still null!...
  6. Replies
    21
    Views
    668

    Re: Need help on simple game for Practice

    I assigned it too dbImage=createImage(500, 500). Is that a wrong type to assign it to?
  7. Replies
    21
    Views
    668

    Re: Need help on simple game for Practice

    There's the test loop I did to make sure the way I cycle through x's and y's worked.


    int x=0;
    int y=0;

    for(int i =0; i < 500; i++){
    if(x >500){
    ...
  8. Replies
    21
    Views
    668

    Re: Need help on simple game for Practice

    For some reason dbImage is still Null!... The if statement says if dbImage is null, dbImage = createImage(500, 500);. but for some reason it skips this step and goes to the next step. The next step...
  9. Replies
    21
    Views
    668

    Re: Need help on simple game for Practice

    I'm stumped. I have been staring at this the whole week. I cannot figure it out. I did a test loop and I didn't run into any problems, I just have the null pointer problem. Any further advice would...
  10. Replies
    21
    Views
    668

    Re: Need help on simple game for Practice

    Thanks for the help you have given so far! I really appreciate this community, hopefully one day I'll be answering these types of questions!

    Also thank you for showing me a way to debug, didn't...
  11. Replies
    21
    Views
    668

    Need help on simple game for Practice

    Hey there.

    I am trying to practice my Java and work on this basic game I'm creating.

    I am at the stage where I am trying to draw the tiled map, but I'm having two problems. The first problem...
  12. Re: Making a Test game, however the JFrame just doesnt load. I think it's an easy fix

    lol awesome thanks! I knew it was something simple!
  13. Making a Test game, however the JFrame just doesnt load. I think it's an easy fix.

    Hello.

    I am making a test game to try out some things I learned, it had worked previously but after I mixed up similar file names I thought I fixed it, however now it runs with no errors at all,...
  14. Re: Problems with GUI, seems simple fix but I can't figure it out

    jps you are awesome, thanks for not spoon feeding me and just giving me hints on which direction, it really helps a lot and I feel like I learn quite a bit as a result.
  15. Re: Problems with GUI, seems simple fix but I can't figure it out

    New code: Works perfectly



    //Thomas Harrald
    //IT215 Checkpoint Inventory Program
    //Camera Inventory program
    import java.util.Arrays;
    import java.io.InputStreamReader;
    import...
  16. Re: Problems with GUI, seems simple fix but I can't figure it out

    Thats what I was afraid of, because when I put it in the main method, i get 35 errors. most of them centering around referencing non static variables; inv, current, showCamera, a few of the get(). I...
  17. Problems with GUI, seems simple fix but I can't figure it out

    Heres my code:



    //Thomas Harrald
    //IT215 Checkpoint Inventory Program
    //Camera Inventory program
    import java.util.Arrays;
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
  18. Replies
    7
    Views
    332

    Re: Having problems with GUI Interface

    I'll take a look at better methods in the morning...

    I modified the toString() to include a \n, and appended all the arrays elements toString().

    It gets the job done... but I will try to find a...
  19. Replies
    7
    Views
    332

    Re: Having problems with GUI Interface

    Norm is there anything specific to look for GUI related? There is a LOT of data in the package lol.
  20. Replies
    7
    Views
    332

    Re: Having problems with GUI Interface

    Thanks a lot Norm, I'll take a look at that.
  21. Replies
    7
    Views
    332

    Re: Having problems with GUI Interface

    I only put two of the Array elements in to troubleshoot. It only shows the last element. cameras[0] overrides cameras[1]. Is there a way I can just make it add the text instead of setting it?

    Just...
  22. Replies
    7
    Views
    332

    Having problems with GUI Interface

    Hello again!

    In class we started this chapter on Graphics and I am struggling to understand it, it seems like it all hit me at once, I did the readings but it just seems like gibberish.

    My...
  23. Replies
    5
    Views
    890

    Re: Help cleaning up my code.

    Totally lacking comments... will work on that.
  24. Replies
    5
    Views
    890

    Re: Help cleaning up my code.

    Here's tonight's assignment, part 3 of the last one.




    //Thomas Harrald
    //Camera Super Class
    //IT215 Inventory Program

    public class CameraClass
  25. Replies
    5
    Views
    890

    Re: Help cleaning up my code.

    Here's the cleaned up code... and I believe it accomplishes what the professor was looking for too.



    //Thomas Harrald
    //IT215 Checkpoint Inventory Program
    //Camera Inventory program
    import...
Results 1 to 25 of 56
Page 1 of 3 1 2 3