Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Radio Buttons

MongloidooMongloidoo Member Posts: 52
I created radio buttons and added an actionlistener to each one so when i select the button the image changes on the screen. But no matter what i do i can't seem to get the method to fire each time the button gets selected.

Does anybody know the format of the if-then statement for a radio button to get a method to fire? The methods fired with a drop down menu that looks like this....


I am not sure if it is possible to apply this statement to radiobuttons somehow?


  • QueezyTheGreatQueezyTheGreat Member Posts: 70
    The reason why your things is not working is that you might have not
    registered the component to the action listener. To register it you
    simply do radioButton.addActionListener(actionlistener). Every
    component has a listener, they might be diffrent, but you have to
    registere the components in order to get an action to fire.

    Hope that helps. :)


  • Andre YoungAndre Young USAMember Posts: 0

    ____ | | free video tutorials and ebooks about < Go JavaScript Visual Basic .NET R PHP C# Visual Basic Delphi PL/SQL Java C++ Swift Python Scratch Perl C Objective-C Ruby Assembly MATLAB ML Awk Scala Fortran LabVIEW SAS F# Logo Erlang Scheme Alice Bash Ada Clojure Julia Transact-SQL Lisp Apex Kotlin ABAP Hack COBOL FoxPro VBScript Prolog Crystal D Dart Lua Rust /> _____________

Sign In or Register to comment.