|
-
July 2nd, 2007, 06:19 AM
#1
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.
-
July 2nd, 2007, 08:46 AM
#2
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.
-
July 2nd, 2007, 08:48 AM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|