I have a Panel which needs to know its size inside the constructor:
class Panneau extends JPanel {
public Panneau() {
super();
new Map(getSize());
}
}
Unfortunately, the size doesn’t seem to have been initialized yet and getSize()
returns a Dimension
with 0 for height and width. How to get the future Dimension
notwithstanding?