The JFrame show method is not depreciated, at least according to my 1.4.2 JDK source. It shows that JFrame inherits it's show method from the Window class. JComponent's show method is however depreciated, which is probably what you were thinking of. In fact I originally thought this may have been the problem, which is why I specifically looked into the difference between the show and setVisible methods. I keep forgetting I am running JDK 1.5 in which the show method is pretty much depricated throughout all the components, not just JComponent. My fault.
(fix the add first to add to the ContentPane though) Yet again, another JDK 1.5 difference.
But your code example will also illustrates some of the problem. If you run your code, , (fix the add first to add to the ContentPane though), you will notice that when you run your code it does not set the Jrame size correctly when setting it for the first time, in the constructor. In fact it remembers the size from any previous TestFrame. Even in between different program executions! To see what I mean, run your code, then resize the frame manually, and close the frame. Then run the code again. You'll see that the frame size is ignored the first time, and the frame size (the one you manually resized) from your last program execution is used. Ok, here is what happens when I run my code. Keep in mind also that I get the same behavior on JDK 1.4. I run my code the first time and the window opens at 800x600. If I click the button, the frame is resized down to 300x200. If I click the button again, it goes back to 800x600. All is good there.
Now, if I run my program, manually drag the window to a larger or smaller size, close the frame, then run the program again, the frame opens at 800x600 which is what is expected as this is what I initially set my frames size at in the constructor.
In another test I did, instead of resizing the frame when the button is pressed, I created a new frame at 300x200. I clicked the button, a new frame opened. I then manually resized that frame and closed it. When I click the button again, another frame opens at 300x200 which is expected.
Then, I ran your code again. What I did notice that was odd is not really what you described but when you set the frame size and print out it's dimensions, the size prints correctly. However, after the frame is realized (the show method is called) the width on the smaller window is different and the height on the TestFrame is different. It's not so much that it is remembering a specified size that you manually resized it to, because no matter what I do, I get the same initial heights and widths everytime I run it.
constructor a: java.awt.Dimension[width=0,height=0]
constructor b: java.awt.Dimension[width=100,height=200]
constructor c: java.awt.Dimension[width=123,height=200]
main a: java.awt.Dimension[width=0,height=0]
main b: java.awt.Dimension[width=800,height=1600]
main c: java.awt.Dimension[width=800,height=1036]
So I did some more testing with mine and if I set the height of my frame anything higher than 1036, it always goes to 1036. Anything lower and it will size to that size. I'm not sure if this is a bug or what but I definatly want to look into it and find out what the heck is going on.