67,513
社区成员
发帖
与我相关
我的任务
分享
label.addKeyListener(new KeyAdapter()
{
@Override
public void keyPressed(KeyEvent e)
{
Control control = (Control)button;
Rectangle current = control.getBounds();
if(e.keyCode == SWT.ARROW_UP)
{
current.y-=5;
}
if(e.keyCode == SWT.ARROW_DOWN)
{
current.y+=5;
}
control.setBounds(current);
}
});