Search:

Type: Posts; User: alex1994

Page 1 of 2 1 2

Search: Search took 0.27 seconds.

  1. Re: help with actionlistener for my calculator; button are created within a for loop for number 1 to9

    i have and tried but cant to seem to get it working, could you give the the correct code to try
  2. help with actionlistener for my calculator; button are created within a for loop for number 1 to9

    i help some help with coding the action listener for my button (btBody) which create button displaying 1 to 9 in a nested for loop; the button should allow the user to click on them and to display...
  3. Re: how do I add Action Listener to my code to make the calculator work

    how do use the getSource() could i have an example.
  4. Re: how do I add Action Listener to my code to make the calculator work

    the actionlistener fr the button in the loop are suppose, once you link on them; that particular number should show up in the JTextField

    the code for the JTextField



    // create p1
    ...
  5. Actionlistener help look at code need button to work for calculator

    need help can someone give the code which i need to allow my calculator to allow the button created from the nested for loop to function with an actionlistener.

    here the code;




    import...
  6. Re: how do I add Action Listener to my code to make the calculator work

    i dont what to you mean can you provide the whole completed code for the actionlistener and the method please
  7. Re: how do I add Action Listener to my code to make the calculator work

    what are the string i need to put in the code
  8. Re: how do I add Action Listener to my code to make the calculator work

    can you please give me the code to fill in the actionlistener as i can't seem to get the button working.



    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;

    public class...
  9. Re: how do I add Action Listener to my code to make the calculator work

    i have try that but the button don't war could give a code which will active the the button form the number within the nested for loop.
  10. Re: how do I add Action Listener to my code to make the calculator work

    what code do i use could you give an example please. i m new to java and using the method of actionlisteners, i have just hear of them today.
  11. Re: how do I add Action Listener to my code to make the calculator work

    i don't get an error but the button don't work




    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;

    public class EX_7_2 extends JFrame
  12. Re: how do I add Action Listener to my code to make the calculator work

    i don't know how to en-corporate the println method with the actionlistener could please give the code
  13. Re: how do I add Action Listener to my code to make the calculator work

    it a calculator the number are to show up in the text field.

    and to answer the first question the button do nothing.
  14. Re: how do I add Action Listener to my code to make the calculator work

    i have moved the code but how do i use make the buttons work so that they show up. do i have to use the println() method; if so could you provide an example.
  15. Re: how do I add Action Listener to my code to make the calculator work

    how can i make all of them have a listener, can you give me an example from some code please.
  16. Re: how do I add Action Listener to my code to make the calculator work

    i added here;




    public class EX_7_2 extends JFrame
    {
    public EX_7_2()
    {
    setLayout(new BorderLayout(5, 10));
  17. Re: how do I add Action Listener to my code to make the calculator work

    i have enter the following code ;




    btBody.addActionListener(new ActionListener() {
    @Override /**HandleItemEvent*/
    public void...
  18. Re: how do I add Action Listener to my code to make the calculator work

    Norm could you please be more exact or give parts of the code i need.
  19. Re: how do I add Action Listener to my code to make the calculator work

    could you give the the whole code which i will allow the number number to work please.
  20. Re: how do I add Action Listener to my code to make the calculator work

    Norm how do i create an instance for my code, i'm not quite familiar with this yet, could you please show me.
  21. Re: how do I add Action Listener to my code to make the calculator work

    is that the only way, it it possible to add the actionlistener without removing the the code.

    --- Update ---

    norm how would i do that can you give me some help or an example code please

    ---...
  22. Re: how do I add Action Listener to my code to make the calculator work

    her is the full code;




    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;

    public class EX_7_2 extends JFrame
  23. Re: how do I add Action Listener to my code to make the calculator work

    i have never heard of code tags have never used them therefore i dont know what i need to do to add the code tags
  24. Re: how do I add Action Listener to my code to make the calculator work

    do you want me to add all of the code i have done;

    here is my code;

    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */
    package welcomegui;
  25. Re: how do I add Action Listener to my code to make the calculator work

    how do i add my code correctly
Results 1 to 25 of 29
Page 1 of 2 1 2