help jTabbedPane, knowing when has been choosen/doing an event

hi there! im now to this whole thing of java and java programing. and so i ask for your help! i have this sord of class:

void newInput (String s){

clienteID.setEditable(true);

clienteID.setText("");

nome.setText("");

morada.setText("");

localidade.setText("");

codpostal.setText("");

ddn.setText("");

idf.setText("");

telemovel.setText("");

email.setText("");

nivel.setText("");

mensal.setText("");

this is something to clean all my textfields, and what i want is, whenever the user click that tab, this class executes so it cleans all the textfields. i entered newInput(); in the end of the JtabbedPane class but the newImput() only rans the first time i build and run the project. and i want it to do everytime i choose that specific tab! im using netbeans but all the design was made in code, line by line, and not forms. but now im stuck with this!

can anyone help me ? i just need to know when the tab is choosen!

ty

[1393 byte] By [Tbba] at [2007-11-26 17:14:56]
# 1
ChangeListener() for tab changesand in stateChanged(..)if(tabbedPane.getSelectedIndex() == theTabYouWant) newInput(..);
Michael_Dunna at 2007-7-8 23:42:55 > top of Java-index,Java Essentials,Java Programming...