Results 1 to 3 of 3

Thread: JAVA help

Threaded View

  1. #1
    Join Date
    Feb 2011
    Posts
    1
    Points
    9,487.23
    Rep Power
    162

    Default JAVA help

    Ok, first off, this code is very messy and uncommented sooo if you know a decent amount on Java you should be able to navigate it for the most part.

    I am making a connect4 game, and please don't refer me to the post below this one, as I can't follow it entirely. I am still very new to Java.

    My issues right now revolve around three things.
    1. Whenever I choose an odd number for the board size, it only displays an even amount of holes for the columns (if you test it you will see what I mean).
    2. As you can see in my code, I am trying to somehow link up my JButtons to an actionlistener...basically be entitled buttons[0] to buttons[(board size)]. However, it only seems to loop and actually assign a listener to half of the buttons, not sure why it is doing that.
    3. Once I do get the buttons working, how will I be able to get the JLabel images updated for a player's piece and at the same time only go down to the next available spot, rather than overlapping.

    Those are my current issues right now and this code is ultra messy, so sorry about that.
    (I've attached the images as well)

    Also, I use Eclipse.
    Code's in the spoiler



    I attached the player piece images, however the arrow image didn't want to upload so I hosted that one offshore, here: http://i421.photobucket.com/albums/p...skom/arrow.png


    Thank you guys so much!
    -Austin
    Attached Images
    Last edited by aanders5; 02-02-2011 at 05:41 PM.

Posting Permissions

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