CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006
    Posts
    37

    Linking code to GUI Interface

    I have a GUI Interface with Add, Edit, Delete, Filter, Sort, Search methods.

    How do I connect the coding for each of the methods above to the GUI Interface so that when the buttons are pressed, the correct method is called and the required output is seen.

    Let's say that I want to add an information or filter something. When I click the appropriate button on the GUI Interface, the correct option has to pop up for me to do what I want to do, in this case, add or filter.

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163

    Re: Linking code to GUI Interface

    To do something when a button is pressed, add an ActionListener to it. See How To Use The Common Button API and How To Write An Action Listener.

    They know enough who know how to learn...
    J. Adams
    Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

  3. #3
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: Linking code to GUI Interface

    Read a tutorial such as:

    http://java.sun.com/docs/books/tutor...nlistener.html

    A word of warning: If you post a continuous stream of questions at such a rate that you clearly haven't made much of an effort to find the answer yourself people will soon get fed up of answering your questions and when you really get stuck you wont get the help you actually need. Before posting you should make an effort to find the answer in a text book or by searching online.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured