#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    1
    Rep Power
    0

    [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 ?
  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,724
    Rep Power
    348
    Can you post the code in this thread? Wrap the code in code tags:
    [code]
    ,......... the code
    here ........
    [/code ] <<< Without the space after the e

    simple gui with a few button/listener's as an example i could use to learn exactly how they work
    Did you See the tutorial for how to write listeners. It has samples:
    http://docs.oracle.com/javase/tutori...nts/index.html

    i still seem to be missing something
    Please explain. Post the code with your questions.
    Last edited by NormR; September 16th, 2012 at 06:37 PM.

IMN logo majestic logo threadwatch logo seochat tools logo