All I need is a JFrame filled with boxes. To start with, the boxes can be in any place in the JFrame. Then the user can move them wherever, and if they are put next to each other, it should say versus. How can I calculate initial positions (to put the boxes in) so that I'll be able to see all of the boxes??
Depends on how crowded the JFrame is. Figure out how tall a box is and the height of the JFrame, as well as how many teams there are. Figure out the height of the JFrame divided by the number of teams there are. If that's more than the height of each box, then there's no vertical overlap (there's room for all of them on top of each other), so evenly space them vertically (i.e. if JFrame height = 500, # of teams = 10, then each team is 500/10 = 50 below the team above it).
So in the above example, team 1's upper left box coordinate is (0,0), team 2's is (0, 50), team 3's is (0, 100), etc.
If there are too many teams to do that without overlapping vertically, then you'll have to get more fancy, I suppose, and not have them all initially all the way to the left.
[edit]
I'm getting some bizarre editing problems. What's being previewed is not what's showing up and the corrections aren't getting saved.
[/edit]