One can build a button with text in 2 ways:
1) JButton example= new JButton("w/text");
2) JButton example2= new JButton();
example2.setText("w/moretext");
[not like you guys needed to know that
]
I know that in C++ doing it the first way is the preferred, supposedly for optimization purposes. Besides the obvious reduction of 1 function call, is there any extra benefit to setting text or anything else this way in
java.