A
Allan Valeriano
Hi all,
I have a class that extends JFrame, and on its constructor, I have the
2 lines of code:
pack();
setLocationRelativeTo(owner);
I'd like to know what would be the difference if I swap those 2
lines...
It seems that if I use:
setLocationRelativeTo(owner);
pack();
the frame gets wrongly aligned but if I put the pack before
setLocationRelativeTo, it gets perfectly centered with the mother
window.
Does anybody knows what is the difference for java when I swap those
lines?
thanks in advance
Allan Valeriano
I have a class that extends JFrame, and on its constructor, I have the
2 lines of code:
pack();
setLocationRelativeTo(owner);
I'd like to know what would be the difference if I swap those 2
lines...
It seems that if I use:
setLocationRelativeTo(owner);
pack();
the frame gets wrongly aligned but if I put the pack before
setLocationRelativeTo, it gets perfectly centered with the mother
window.
Does anybody knows what is the difference for java when I swap those
lines?
thanks in advance
Allan Valeriano