September 16th, 2012, 04:01 PM
[HW] need help Useing listeners for JButtons on GUI
im working on a two truth and lie type program with GUI, my teacher who told us to just build a simple GUI with a little info about yourself, load a pic etc but i wanted to go father with it.
im stuck on listeners for my two buttons and how to implement the actual logic of the code with the buttons.
(apparently I cant actually post the link to pastebin because im a new user but just paste /hrc30NA1 after the url to see my code.)
Above is what i have so far, pretty much just the GUI at the moment but does someone have a simple gui with a few button/listener's as an example i could use to learn exactly how they work?
and yes ive read the oracle documentation on listeners but i still seem to be missing something. could someone help me out ?
September 16th, 2012, 05:33 PM
Can you post the code in this thread? Wrap the code in code tags:
,......... the code
[/code ] <<< Without the space after the e
Did you See the tutorial for how to write listeners. It has samples:
Please explain. Post the code with your questions.
Last edited by NormR; September 16th, 2012 at 05:37 PM.