class KCorePanel extends javax.swing.JPanel implements ChangeListener {

    private KCoreFilter filter;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JSpinner degreeSpinner;
    // End of variables declaration//GEN-END:variables

    public KCorePanel() {
        initComponents();
    }

    @Override
    public void stateChanged(ChangeEvent evt) {
        FilterProperty k = filter.getProperties()[0];
        try {
            k.setValue(degreeSpinner.getValue());
        } catch (Exception e) {
            Exceptions.printStackTrace(e);
        }
    }

    public void setup(KCoreFilter filter) {<FILL_FUNCTION_BODY>}

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        degreeSpinner = new javax.swing.JSpinner();

        setLayout(new java.awt.GridBagLayout());

        degreeSpinner.setModel(
            new javax.swing.SpinnerNumberModel(Integer.valueOf(1), Integer.valueOf(1), null, Integer.valueOf(1)));
        degreeSpinner.setPreferredSize(new java.awt.Dimension(65, 28));
        add(degreeSpinner, new java.awt.GridBagConstraints());
    }// </editor-fold>//GEN-END:initComponents
}

        this.filter = filter;
        degreeSpinner.setModel(new javax.swing.SpinnerNumberModel(filter.getK(), 1, null, 1));
        degreeSpinner.getModel().addChangeListener(WeakListeners.change(KCorePanel.this, degreeSpinner.getModel()));
    
<methods>public void <init>() ,public void <init>(java.awt.LayoutManager) ,public void <init>(boolean) ,public void <init>(java.awt.LayoutManager, boolean) ,public javax.accessibility.AccessibleContext getAccessibleContext() ,public javax.swing.plaf.PanelUI getUI() ,public java.lang.String getUIClassID() ,public void setUI(javax.swing.plaf.PanelUI) ,public void updateUI() <variables>private static final java.lang.String uiClassID