how do use the getSource() could i have an example.
Type: Posts; User: alex1994
how do use the getSource() could i have an example.
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
...
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...
i dont what to you mean can you provide the whole completed code for the actionlistener and the method please
what are the string i need to put in the code
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...
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.
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.
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
i don't know how to en-corporate the println method with the actionlistener could please give the code
it a calculator the number are to show up in the text field.
and to answer the first question the button do nothing.
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.
how can i make all of them have a listener, can you give me an example from some code please.
i added here;
public class EX_7_2 extends JFrame
{
public EX_7_2()
{
setLayout(new BorderLayout(5, 10));
i have enter the following code ;
btBody.addActionListener(new ActionListener() {
@Override /**HandleItemEvent*/
public void...
Norm could you please be more exact or give parts of the code i need.
could you give the the whole code which i will allow the number number to work please.
Norm how do i create an instance for my code, i'm not quite familiar with this yet, could you please show me.
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
---...
her is the full code;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class EX_7_2 extends JFrame
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
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;
how do i add my code correctly
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;...
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...