Here you can find the source of convertToYesNo(JCheckBox checkBox)
public static String convertToYesNo(JCheckBox checkBox)
//package com.java2s; /*L//from w w w. jav a2 s . c o m * Copyright Ekagra Software Technologies Ltd. * Copyright SAIC, SAIC-Frederick * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/cacore-sdk/LICENSE.txt for details. */ import javax.swing.JCheckBox; public class Main { public static String convertToYesNo(JCheckBox checkBox) { if (checkBox.isSelected()) return "Yes"; return "No"; } }