0

hi everyone,
i am doing a project .............i have a problem
1.when i press F4 key i need to get a pop-up window and i need to search names in that poup window .
For Example :
All the client names start with A
2.when user types A & preees enter (wild card search)

3
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by vinod_javas
0

yeah you can do that aruna....

try this code

Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener()
{


public void eventDispatched(AWTEvent a_objevent)
{
if(a_objevent instanceof KeyEvent && a_objevent.getID() == KeyEvent.KEY_RELEASED &&
!((KeyEvent)a_objevent).isAltDown() && !((KeyEvent)a_objevent).isControlDown()
&& !((KeyEvent)a_objevent).isShiftDown() && !((KeyEvent)a_objevent).isMetaDown())
{
int l_iKeyCode = ((KeyEvent)a_objevent).getKeyCode();
switch(l_iKeyCode)
{


case KeyEvent.VK_F4:


for ex:  popup();
(call your pop up window here);
break;



}
}
}


}, AWTEvent.KEY_EVENT_MASK);

Edited by happygeek: fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.