@Override
  public void setVisible(boolean b) {
    if (b == isVisible()) return;

    super.setVisible(b);

    if (ClassicPrefs.getWindowMaximized("InstrumentsDbFrame")) {
      setExtendedState(getExtendedState() | MAXIMIZED_BOTH);
    }
  }
  private void setSavedSize() {
    Rectangle r = StdUtils.getWindowBounds("InstrumentsDbFrame");
    if (r == null) {
      setDefaultSize();
      return;
    }

    setBounds(r);

    if (ClassicPrefs.getWindowMaximized("InstrumentsDbFrame"))
      setExtendedState(getExtendedState() | MAXIMIZED_BOTH);
  }
  /** Invoked when this window is about to close. */
  private void onWindowClose() {
    boolean b = (getExtendedState() & MAXIMIZED_BOTH) == MAXIMIZED_BOTH;
    ClassicPrefs.setWindowMaximized("InstrumentsDbFrame", b);
    if (b) return;

    StdUtils.saveWindowBounds("InstrumentsDbFrame", getBounds());
    int i = splitPane.getDividerLocation();
    preferences().setIntProperty("InstrumentsDbFrame.dividerLocation", i);

    mainPane.getInstrumentsTable().saveColumnsVisibleState();
    mainPane.getInstrumentsTable().saveColumnWidths();
  }