Java JButton Default setDefaultButton(JButton jButton)

Here you can find the source of setDefaultButton(JButton jButton)

Description

set Default Button

License

Open Source License

Declaration

public static void setDefaultButton(JButton jButton) 

Method Source Code

//package com.java2s;

import javax.swing.JButton;

public class Main {

    public static void setDefaultButton(JButton jButton) {
        if (jButton == null) {
            throw new IllegalArgumentException();
        }/*from   ww  w.  jav a2  s. c o m*/
        jButton.getRootPane().setDefaultButton(jButton);
    }
}

Related

  1. applyDefaultProperties(final JButton comp)
  2. ensureDefaultButtonWidth(JButton button)
  3. setDefaultButton(final JRootPane rp, final JButton b)
  4. setupWindowContentPane(final Window aWindow, final Component aCenterComponent, final Component aButtonPane, final JButton defaultButton)