craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > JDBC/Database Issues Post New Topic   Post A Reply
what is the focus after onNewButtonClick() printer friendly version
next newest post | next oldest post
Author Messages
jiantu{@}lehman.com
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

Ben,

What is the component that receives the focus after this methods:
DatabaseChangeListener.onNewButtonClick()? I tried to guess but failed.

I need to know as I want to be able to remove the new row if user press the Esc key, i.e., user can cancel the add new row action.

Thanks
Jian

admin{@}quicktable.org
Unregistered
Edit or delete this message Reply w/Quote
Posted Wednesday, December 31, 1969 @ 23:59:59  

I am not focusing any component after the new button click. If you want to listen for "ESC", just add a listener as below.

KeyStroke esc = KeyStroke.getKeyStroke(KeyEvent.VK_ESC,0);

yourQuickTable.getTable().registerKeyboardAction(this,"esc",esc,JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);


public void actionPerformed(ActionEvent e)
{
if (e.getActionCommand().compareTo("esc")==0)
{
//your action
}
}

Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios