Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Listen to two JRadioButton + ons JButton to produce output

  1. #1
    Junior Member
    Join Date
    Apr 2010
    Posts
    23
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Listen to two JRadioButton + ons JButton to produce output

    Listen to two JRadioButton + ons JButton to produce output

    I am a beginner in Java ..
    I am trying to write a code for a simple program
    I will omit the details; I will focus here on the problem.

    I have a simple interface
    Two JRadioButton objects called even and odd
    One JButton called generator
    One JTextArea called txtArea
    Depending on:
    If the radio button even is selected and the button generator is clicked produces an output to the txtArea
    If the other radio button odd is selected and the button generator is clicked produces a different output to the txtArea

    How to link those together



    give me the Outline


       private class ButtonWatcher implements ActionListener
       {
                      public void actionPerformed(ActionEvent a)
          {
          }
       }
    Last edited by voltaire; May 12th, 2010 at 01:51 PM.


  2. #2
    Junior Member
    Join Date
    Apr 2010
    Posts
    23
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Re: Listen to two JRadioButton + ons JButton to produce output

    I solved it myself ,, I don't need any help


Similar Threads

  1. How to Create a server socket to listen for incoming connections?
    By JavaPF in forum Java Networking Tutorials
    Replies: 3
    Last Post: October 28th, 2011, 10:02 AM
  2. [SOLVED] JRadioButton Event Handling Help?
    By CS313e in forum AWT / Java Swing
    Replies: 2
    Last Post: March 27th, 2010, 12:56 PM
  3. Jigloo help to produce a text area which only scrolls down
    By rtumatt in forum AWT / Java Swing
    Replies: 0
    Last Post: February 2nd, 2010, 06:09 PM
  4. Buttons don't work on using JRadioButton
    By neo_2010 in forum AWT / Java Swing
    Replies: 4
    Last Post: July 11th, 2009, 12:37 PM
  5. Replies: 9
    Last Post: June 27th, 2009, 05:05 PM