> Jeffrey Schwab schrieb:
>>
>>> frame.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
>>
>> Thank you.
For not using JFrame.EXIT_ON_CLOSE, and more to the point, for showing
the correct way to dispose of a Swing frame. I cringe every time I see
EXIT_ON_CLOSE, in the same way I cringe when I see System.exit(1).
>>> frame.setContentPane( comboBox );
>>
>> :-)
The idea of setting the content pane to something that's only nominally
a container made me smile. I'm not knocking it; it makes sense in the
context of your example. I just would have expected frame.add(comboBox).
> ??? For what?
>
> Bye
> Michael
Michael Rauscher - 28 Sep 2006 15:57 GMT
Jeffrey Schwab schrieb:
>> Jeffrey Schwab schrieb:
>>>
[quoted text clipped - 5 lines]
> the correct way to dispose of a Swing frame. I cringe every time I see
> EXIT_ON_CLOSE, in the same way I cringe when I see System.exit(1).
I thought the "thanks" goes to the fact, that the SSCCE exits and you
didn't have to use Ctrl-Break. *lol*
>>>> frame.setContentPane( comboBox );
>>>
[quoted text clipped - 3 lines]
> a container made me smile. I'm not knocking it; it makes sense in the
> context of your example. I just would have expected frame.add(comboBox).
I tend to use setContentPane in my examples because it works with 1.4,
too and it's shorter than frame.getContentPane().add(...) :)
Bye
Michael