Stub event handler methods

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Stub event handler methods

Postby ncister » Wed Jan 19, 2005 2:08 am

Hi all,

I'm evaluating WindowBuilder and i'm using the "stub event handler methods" option .... but is it possible obtains something like:

txtName = new JTextField();
txtName.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
do_txtName_keyPressed(txtName, e);
}
public void keyReleased(KeyEvent e) {
}
public void keyTyped(KeyEvent e) {
}
});
txtName.setBounds(31, 19, 120, 22);
frame.getContentPane().add(txtName);
}

protected void do_txtName_keyPressed(Object sender, KeyEvent e) {
}


.... where stub method receive either the component reference (sender) and the event object (e) ....
It's very useful !!!

Thanks.
Nicola.
ncister
 
Posts: 14
Joined: Wed Jan 19, 2005 1:57 am

Return to Swing Designer

Who is online

Users browsing this forum: Google [Bot] and 1 guest