PDA

Click to See Complete Forum and Search --> : IDE's and Action listners


US101
Jul 24th, 2001, 09:23 AM
Hi,

I have just started with Java, and I am haveing trouble with action listners. I understand how to add a button to a container. I am then able to add the actionlistner, but I do not know what method it calls when an action occurs.

Does anyone know whee I can find a list of all/most possible actions for labels/buttons/etc. and what methods they call?

Also what IDE does anyone use (if any)?

sail3005
Jul 24th, 2001, 02:41 PM
JBuilder is the best if you have the resources to run it smoothly

billrogers
Jul 24th, 2001, 04:37 PM
No way I like visual cafe better but it is pricey.

sail3005
Jul 24th, 2001, 04:51 PM
my friend uses notepad and a command line compiler :)

Dillinger4
Jul 24th, 2001, 07:03 PM
I find myself somewhat torn between using an IDE and just coding in plain old notpad. I just code in notepad because i think it makes you a better programmer. Either you know what method you want to call or you dont. No so called "code complete" or "Intelsense" to coddle you. Honestly if FORTE's memory requirements werent so high 128Mb then i might use it but i dont see upgrading my memory by 64Mb speeding up FORTE, it's just too dam slow.

If you want so information on Action Listenters try this link out.
look to the left for "The really Big index" off of that link there is alot of Java information.

http://java.sun.com/docs/books/tutorial/index.html

Dillinger4
Jul 24th, 2001, 07:18 PM
Here is a snippet of code from an app i have that implements a ActionListener interface. Remember if you implement an interface
then you have to provide implemetaion for every method declaration within the interface. If you extend(subclass) an adapter class then all you have to do is override the particular method needed.



import java.awt.event.*;

class ButtonHandler implements ActionListener{
public void actionPerformed(ActionEvent ev){
String LayoutManager = ev.getActionCommand();
System.out.println(LayoutManager);
}
}

If you wanted to add this to a button then you would use the componets (Jbutton) addActionListener() method.

For instance......

import java.swing.*;
import java.awt.event.*;

public class test{
public static void main(String [] args){

JButton jb = new JButton();
jb.addActionListener(new ButtonHandler());

}
}

sail3005
Jul 24th, 2001, 09:06 PM
i can see where using notepad can make you a better programmer, because it forces you to memorise things.

-BTW Dilenger4, how did you get your avatar so big?

Dillinger4
Jul 24th, 2001, 09:57 PM
I wish i could tell you but i have no clue :confused:

US101
Jul 25th, 2001, 10:43 AM
Thanks for the replys.

I tried Visual Cafe, I found the 110MB file free for download on the website, and it seems OK. I also tried Forte, and I see what you mean, it is slow with 64MB Memory.

As for notepad, it there a notepad that has syntax highlighting and error correction, just like an IDE, but without the help to add buttons etc?

VirtuallyVB
Jul 25th, 2001, 11:52 AM
I use notepad with a dos shell command line. But if I recall, Textpad has color syntax highlighting. Textpad also made it easier to find the offending line of an error.

sail3005
Jul 25th, 2001, 04:00 PM
Has anyone tried JBuilder 5? I have only used 3, 3.5, and 4

Dillinger4
Jul 27th, 2001, 01:09 PM
This is a really good text editor that i used to use in school.
for 30 bucks i think it is well worth it especially you like to code in a non IDE enviorment but want syntax highlighting and other features that are not present in notepad. enjoy!

http://www.editplus.com/

sail3005
Aug 9th, 2001, 06:40 PM
cool. too bad linux has a lot of editors like that for free though :(