(How can I make)/(is there)/(how will/can I use) a method that will get called automatically when the size of my JFrame is changed (a window event method type of thing)?
I tried this, I put this (below) in the "public ClassName()" method (in this method "public static void main(String args)" is "new ClassName().show();"):
and I put this method right at the bottom of my code (inside the class method):
But I have no idea if this is the way the windowStateChanged method is used.
I was poking around here and here.
addWindowListener(new WindowAdapter()
{
public void windowStateChanged(WindowEvent e)
{
windowStateChanged(e);
}
});private void windowStateChanged(WindowEvent e)
{
// code to do each time the size is changed on the window
}

