pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gk_br...@verizon.net>
Subject Re: KeyListeners on ImageView
Date Tue, 01 Mar 2011 12:35:48 GMT
ImageView isn't focusable, so it can't receive keyboard input. I'd have to check, but I believe
the same applies to Border. You should be able to add the key listener on an ancestor of the
ImageView, though.

On Feb 28, 2011, at 11:03 PM, Thomas Grimaud wrote:

> 
> I'm trying to add a ComponentKeyListener on an ImageView component , in order to catch
the DEL button.
> 
> It doesn't work, I did exactly the same thing on a TextArea and everything worked fine.
> 
> image.getComponentKeyListeners().add(new ComponentKeyListener.Adapter() {
> 		@Override
> 		public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
{
> 			.....
> 		return true;
> 	}
> });
> 
> How can I make it work on an ImageView, or even a Border, as I have the same pb on a
Border?
> 
> 
> 


Mime
View raw message