Here you can find the source of detachChangeListeners(JSpinner spinner)
public static ChangeListener[] detachChangeListeners(JSpinner spinner)
//package com.java2s; // LICENSE: This file is distributed under the BSD license. import javax.swing.*; import javax.swing.event.ChangeListener; public class Main { public static ChangeListener[] detachChangeListeners(JSpinner spinner) { ChangeListener[] listeners = spinner.getChangeListeners(); for (ChangeListener listener : listeners) { spinner.removeChangeListener(listener); }/*w w w. j a va 2 s . c o m*/ return listeners; } }