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

    Default return value on a button click

    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
    Rep Power


    it's easy. You can pass a refer by need object in main menu.
    The same question is in this thread.
    Skype: petrarsentev

Similar Threads

  1. Button click GUI question
    By ZambonieDrivor in forum New To Java
    Replies: 2
    Last Post: 11-29-2010, 07:48 AM
  2. SaveAs button click
    By in forum AWT / Swing
    Replies: 2
    Last Post: 07-06-2010, 08:35 AM
  3. How can I display on Button click?
    By ntagrafix in forum New To Java
    Replies: 3
    Last Post: 11-04-2009, 12: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, 04:46 PM
  5. deselecting a button after the click.
    By ramsrocker in forum New To Java
    Replies: 10
    Last Post: 02-15-2009, 06: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