This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
im trying to move my debugging output from system.out.println() to the frame i made with the awt that already has some buttons and things in it. so every time i do something, im trying to do this.add(label) to tell me that what i expect is being done is being done. but when i add lables, they dont show up until i resize the window, and then it shows up horizontally to the left and vertically centered. so i figure, the other stuff in the window is hiding it, so i try setSize(200,200) in the constructor. But that didnt even resize the window! now, i have to resize the window to 400 pixels vertically to see the text show up, as if all it did was make a big white block of size 200x200 that hides my new lables! whats the right way to move my debugging to this frame?
The first thing to realize is that any time you change the structure of a graphical element (like adding components to a frame/panel), you need to call validate() on it to tell it that it needs to re-do it's layout and display work.
Next, what you are describing is a very heavy-weight way to view debugging messages. It might be easier to create a scrolling text area, then just add your messages to the text displayed by that text area.