File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
regarding addactionListener method??
Joined: Aug 31, 2008
Feb 21, 2009 08:51:12
class Shar extends Frame implements
Panel p=new Panel();
Button b=new Button();
//more code here
public void actionPerformed(
System.out.println(" Hi ");
public static void main(Stirng s)
Shar s=new Shar();
My Doubt is How the control flow calls the actionPerformed() method after b.addActionListener(this); ???
Thanks in Adv
Joined: Dec 13, 2008
Feb 21, 2009 09:26:35
It's called when you press the button, button's UI haves event handler which implements MuoseListener and more which fires this actionPerformed.
And next time use code tags, it's just mouse click away.
Joined: Oct 27, 2005
Feb 21, 2009 10:17:48
Use Code Tags
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
I agree. Here's the link:
subject: regarding addactionListener method??
Urgent! jtable get value when cell is edited
Event (Urgently Help)
Inner Class help
I can't read clearly the label of my JButton?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014