>From the 2 examples: "JFrame_AddJPanelToJFrame_SwingButtons" &
"JFrame_AddJPanelToJFrame_CelsiusConverter", I see that the coding
styles are different. The former put the creating of Panel and Frame
in the main method while the latter put that under the constructor. I
do understand that a program can be coded in many different way. But
which is usually the best approach or pratical approach in real world
of programming?

Another question is in "JFrame_AddJPanelToJFrame_CelsiusConverter", it
has the following code:
converterJFrame.setSize(new Dimension(120, 40));
converterJFrame.pack();

No matter how big the frame I wish to expand, it will still be pack.
Henceforth, what is the use of calling setSize?

-- 
You received this message because you are subscribed to the Google Groups 
"JPassion.com: Java Programming" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jpassion_java?hl=en.

Reply via email to