Size modifications
Hi,
I possess a code which displays a complicated window (with various buttons and so on).
Just as a start for learning Java, I would like to modify its size (width and length), thinking it would be a very simple matter.
Yet it wasn't
Some code extract is the following:
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
java.awt.Dimension dialogSize = getSize();
setSize(new java.awt.Dimension(100, 100));
By modifying the values 100 I do not get any size variation.
These lines lie in a certain class inside which an init method is called.
The init method begins with a strange header saying
"/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the FormEditor.
*/
"
Inside this method there are other size settings:
pack();
java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
java.awt.Dimension dialogSize = getSize();
setSize(new java.awt.Dimension(230, 305));
setLocation((screenSize.width-230)/2,(screenSize.height-305)/2);
What is it all about? Is that the reason why I cannot modify the window?
What is the FormEditor? Is the code actually automatically re-written?
Sorry, maybe it is a stupid matter, but I cannot get out of it ..
Thanks in advance,
Stefano.

