@Override public void componentResized(ComponentEvent e){
  if (e.getComponent() == component) {
    double newRatio=getCurrentRatio();
    if (Math.abs(newRatio - activeRatio) > threshold) {
      activeRatio=newRatio;
      executeResize(newRatio);
    }
  }
}

@ Override public void componentResized ( ComponentEvent e ) { if ( e . getComponent ( ) == component ) { double newRatio = getCurrentRatio ( ) ; if ( Math . abs ( newRatio - activeRatio ) > threshold ) { activeRatio = newRatio ; executeResize ( newRatio ) ; } } }
react to a component resize event .
