This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes listener dead? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "listener dead?" Watch "listener dead?" New topic
Author

listener dead?

kelvin cheung
Ranch Hand

Joined: Mar 27, 2004
Posts: 120
hi,
i have 1 GUI class that has buttons,
and the listener is in the CTRL class.

they are somehow connected with each other.
but nothing happens when i do something with the GUI.






why is that?
thank you.

regards,
kelvin
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8876
    
    8

There's a fine line to walk when posting code. You want to post enough code for us to help you, but if you post too much code, no one will bother to read it. In your case, you posted a ton of code, but you failed to post HoyreStud or SorStud, which are obviously important pieces to this puzzle. If you did post these classes, I could practically gaurantee that noone would bother to dig through all that code. In the future, you should pare your code down to to a simple test case. One that a reader can compile and run. You'd be surprised at what you can figure out by concentrating on the problem rather than 100's of lines of code.
That said, my wild guess is that HoyreStud.getRadioNr() is creating a new radio button instance with every call, so you are putting one radio button on the GUI and setting the listener on another instance.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: listener dead?