Java JCheckBox initJCheckBox(JCheckBox box, String element)

Here you can find the source of initJCheckBox(JCheckBox box, String element)

Description

Initiates the Check Box

License

Open Source License

Parameter

Parameter Description
box The checkbox to init
element The element

Declaration

public static void initJCheckBox(JCheckBox box, String element) 

Method Source Code

//package com.java2s;
/* //from  w w  w .j  ava 2  s . c o m
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

import javax.swing.JCheckBox;

public class Main {
    /**
     * Initiates the Check Box
     *
     * @param box The checkbox to init
     * @param element The element
     */
    public static void initJCheckBox(JCheckBox box, String element) {
        box.setSelected(Boolean.parseBoolean(element));
    }
}

Related

  1. createCheckBox(String name, String command, boolean selected)
  2. createCheckBox(String s, boolean b)
  3. createJCheckBox(Rectangle bounds)
  4. exclusive(final JCheckBox first, final boolean firstState, final JCheckBox second, final boolean secondState)
  5. imply(final JCheckBox checked, final boolean checkedState, final JCheckBox changed, final boolean impliedState)
  6. isCheckBoxModified(JCheckBox checkBox, boolean originalValue)
  7. link(final JCheckBox box, final JComponent... comps)
  8. newJCheckBox()
  9. newJCheckBox(String n, char m)