Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-26-2008, 05:00 PM   PM User | #1
arcticwind
New to the CF scene

 
Join Date: May 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
arcticwind is an unknown quantity at this point
Buttons in Java

Okay, so I need to make some buttons and connect them to methods. Unfortunately, I haven't the slightest idea how to begin. I've found various ways to make buttons, but I haven't figured out to make them call methods in another class. This is probably very simple, so I apologize.

Thanks so much for your help!
arcticwind is offline   Reply With Quote
Old 06-02-2008, 09:19 PM   PM User | #2
malfist
Regular Coder

 
Join Date: May 2008
Posts: 188
Thanks: 7
Thanked 7 Times in 7 Posts
malfist is an unknown quantity at this point
jButton.addActionListener(this); will add and action listener which will listen for clicks. If a click occurs on jButton it will search 'this' for the action handler to figure out what to do.

Before you try doing UI, you should attempt to learn the basics of Java and OOP. Java's website java.sun.com has some good tutorials or you can checkout/buy a book on beginning java programming.
malfist is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:40 AM.


Advertisement
Log in to turn off these ads.