Wednesday, 29 May 2013

Tell me, Harry, what exactly is the function of a rubber duck?

Siriusly! I'm getting distracted by that :) 

Anyways, I tried to add the pawns to my board, but it added *IN THE MIDDLE* instead of on the board! I even changed the coordinates from (2, 48) to (100, 100) and it didn't change a thing! I'm even adding it in the NORTH panel and it still shows up in the middle! DARRNIT! Something's gone entirely wrong o-O 

SHEEESH! I set these locations: 1458 , 575 and IT STILL DISPLAYS IN THE MIDDLE! 

I don't want to bother Ryk about it, but this is getting so freaken annoying! 

I even have this as tracing: 


if (tracing) 
        {
            System.out.println("Character in location before adding: " + characterUser.getLocation());
            System.out.println("Character in layer before adding: " +north.getLayer(characterUser));
            System.out.println("Character in index before adding: " +north.getIndexOf(characterUser));
            System.out.println("Character's position before adding: " +characterUser.getLocation());
        } //end of if statement

And this is what outputs (which is also correct!) 


Character in location creating pane: java.awt.Point[x=0,y=0]
Character in location before adding: java.awt.Point[x=1458,y=575]
Character in layer before adding: 3
Character in index before adding: -1
Character's position before adding: java.awt.Point[x=1458,y=575]
Character in location after adding: java.awt.Point[x=1458,y=575]
BUILD SUCCESSFUL (total time: 7 seconds)

Originally, I set the position to (0, 0). And then I set it to 1458, 575; and all the other ones are correct, but it still show up in the middle. 

This is so irritating! It really shouldn't be that freaken hard! UGHHHH! 

I wonder if it has something to do with the coordinates of the JLabel rather than the pane because when i use mouseClicked, it gives the coordinates on the JLabel rather than the pane in general. BUT THAT DOESN'T EXPLAIN WHY THE BLOODY HELL IT IS IN THE MIDDLE! 

EEEEEEEEEEEEEEK! I'm taking a break from CS right now >_< It's not making any sense. And I can't do anything about the program when I'm freaking out about it. So, whatevers! Be back in an hour -_- 

No comments:

Post a Comment