Results 1 to 2 of 2
  1. #1
    Anne is offline Member
    Join Date
    Aug 2015
    Posts
    18
    Rep Power
    0

    Default How to make a label display a different thing every other time a button is clicked?

    I want to do this in Netbeans' Graphical User Interface. I also want to know how to display a light in a label when a button is clicked.

    Thanks for your help & any other relevant information will be appreciated!

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    20,003
    Rep Power
    33

    Default Re: How to make a label display a different thing every other time a button is clicke

    how to display a light in a label when a button is clicked.
    Add a listener to the button. Have the code in the listener change what the label displays.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. how do i make a button that will change the label?
    By mbschutlz97 in forum New To Java
    Replies: 4
    Last Post: 01-29-2014, 06:48 PM
  2. How do i make a panel go away if a button is clicked?
    By mbschutlz97 in forum New To Java
    Replies: 3
    Last Post: 01-28-2014, 12:18 AM
  3. Make a website open when a button is clicked.
    By MR bruto in forum New To Java
    Replies: 1
    Last Post: 06-01-2013, 09:42 PM
  4. Replies: 1
    Last Post: 08-16-2010, 10:49 AM
  5. Display success message in same page when submit button is clicked
    By am17mu in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 03-29-2008, 10:56 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
  •