![]() |
|
#1
|
|||
|
|||
Anything i can do with static addActionListener(this);I'm new to java and started creating a program with a menu and menubars which i would like to have addActionListener(this); but seems i can't do this due to it being static. Is there a way around this?
JAVA Code:
|
|
#2
|
||||
|
||||
Re: Anything i can do with static addActionListener(this);How about eliminating the need for 'static context'?...
1. EXCEPT for the line with main, which needs the static keyword, eliminate all other static keywords. 2. Then change this: JAVA Code:
JAVA Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Anything i can do with static addActionListener(this);Nice one, thanks it worked, now onto my next problem :> i'll give it a try first.
|
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| draw in image | jafar | FLTK Forum | 2 | 19-Sep-2006 10:51 |
| Handling keyup events. | harroldm | FLTK Forum | 3 | 24-Aug-2006 08:48 |
| addActionListener(this) conflicts with static | _Y_ | Java Forum | 2 | 03-Aug-2006 01:47 |
| calling static member function through object | alcoholic | CPP / C++ Forum | 3 | 06-Dec-2005 06:10 |
| error related to static member functions and varaibles | kai85 | CPP / C++ Forum | 3 | 20-May-2005 06:11 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The