Search:

Type: Posts; User: alex1994

Page 1 of 2 1 2

Search: Search took 0.13 seconds.

  1. 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.
  2. 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
    ...
  3. 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...
  4. 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
  5. 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
  6. 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...
  7. 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.
  8. 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.
  9. 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
  10. 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
  11. 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.
  12. 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.
  13. 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.
  14. 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));
  15. 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...
  16. 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.
  17. 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.
  18. 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.
  19. 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

    ---...
  20. 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
  21. 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
  22. 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;
  23. Re: how do I add Action Listener to my code to make the calculator work

    how do i add my code correctly
  24. Re: how do I add Action Listener to my code to make the calculator work

    i used the following code to create my number 1 to 9
    JPanel p2 = new JPanel();
    p2.setLayout(new GridLayout(4, 3, 5, 5));

    int num;
    for (int iRow = 3;...
  25. Re: how do I add Action Listener to my code to make the calculator work

    Hi, i know that i need ;

    public void actionPerformed(ActionEvent e) {

    }

    how i don't know how to give each individual number in the calculator a action so that the number...
Results 1 to 25 of 27
Page 1 of 2 1 2