Results 1 to 2 of 2
  1. #1
    Ami
    Ami is offline Member
    Join Date
    Feb 2012
    Posts
    26
    Rep Power
    0

    Default How to find out if a JCheckBox had been unselected after being selected

    Hi

    My application has a number of checkboxes.
    Of course, there are implications when checkboxes are ticked. Therefore, I need a way of finding out when a checkbox gets ticked and then unticked in order to undo the functionality that was triggered by ticking it.

    I know that if a checkBox's .isSelected() method returns false, that means it is not selected. However, I need to know if it has been unselected after being selected.

    Any help would be appreciated.

    Thank you

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,307
    Rep Power
    25

    Default Re: How to find out if a JCheckBox had been unselected after being selected

    There are event objects passed to listeners that should describe the event that happened to the checkbox. Have you tried looking at what is in them?
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Cannot find isSelected() method for JCheckBox
    By coderz in forum New To Java
    Replies: 1
    Last Post: 06-19-2012, 11:19 AM
  2. unselected item from selected list
    By prasathbala in forum NetBeans
    Replies: 0
    Last Post: 01-10-2012, 05:41 AM
  3. JCheckBox
    By bczm8703 in forum JDBC
    Replies: 1
    Last Post: 10-23-2011, 05:30 PM
  4. How to get values for unselected checkbox values
    By sarath13 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 01-07-2011, 08:54 AM
  5. Gui Blocked after selected a Jcheckbox
    By simplo in forum AWT / Swing
    Replies: 2
    Last Post: 09-03-2010, 10:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •