Results 1 to 2 of 2
  1. #1
    wotupduck is offline Member
    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Default return value on a button click

    hi,
    I have a root class that makes a new instance of a mainmenu class
    The mainmenu object simply just displays a GUI with options and buttons.

    When a button is clicked on the GUI is there anyway of sending a value back to the root class (which identifies the button i.e. button text) from the button handler?

    thanks in advance.

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    it's easy. You can pass a refer by need object in main menu.
    The same question is in this thread. Equivalent of PHP isset in JAVA
    Skype: petrarsentev
    http://TrackStudio.com

Similar Threads

  1. Button click GUI question
    By ZambonieDrivor in forum New To Java
    Replies: 2
    Last Post: 11-29-2010, 08:48 AM
  2. SaveAs button click
    By kasiram.p@gmail.com in forum AWT / Swing
    Replies: 2
    Last Post: 07-06-2010, 09:35 AM
  3. How can I display on Button click?
    By ntagrafix in forum New To Java
    Replies: 3
    Last Post: 11-04-2009, 01:05 AM
  4. How we can open a file with a click in button
    By kostinio in forum AWT / Swing
    Replies: 2
    Last Post: 11-01-2009, 05:46 PM
  5. deselecting a button after the click.
    By ramsrocker in forum New To Java
    Replies: 10
    Last Post: 02-15-2009, 07:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •