Jacob Draper wrote:I was getting the spaces myself. If you notice, the array you are creating is of length 75. Count the spaces and maybe you will see it's the same? Maybe you are converting that entire array to a String (including those elements that are blank). Change that array to something else say 25 and see what you get!
Hopefully that points you in the right direction.
Also, I agree with Andrew as far as formatting. A few returns and indentations could make it much easier for others to read your code. I didn't get crazy but at least put gaps between your methods So it didn't all just look like one big block.
Andrew Monkhouse wrote:
I had to reformat your code in order to read it.
I'm not sure what we are doing differently, but it works for me:
Perhaps you can copy/paste your command line output so we can see what I are doing differently to you?
Campbell Ritchie wrote:Welcome to the Ranch
It isn't called Swings.
You need to start small; you cannot expect to design a large GUI like that until you have designed simpler things.
Rob Camick wrote:
Start by reading the Swing tutorial, especially the sections on:
1. How to Use Border Layout - this will allow you to put your buttons on the left and the other panels in the center.
2. How to Use Card Layout - this will allow you to add all the panels in the center and then swap them, depending on the button pressed.