Topic: 新手请教 (JPanel 与 JScrollPane)

  Print this page

1.新手请教 (JPanel 与 JScrollPane) Copy to clipboard
Posted by: wzc
Posted on: 2003-04-30 21:04

我将JPanel 放在JScrollPane中,然后在JPanel中画图。之后我在JPanel中加入addKeyListener,希望键盘操作在JPanel中所画的图元,但确是JScrollPane的滚动条移动,怎么解决呢?谢谢

2.Re:新手请教 [Re: wzc] Copy to clipboard
Posted by: seacloudy
Posted on: 2003-05-04 13:56

关键是你设置的focusable的组件。
类似与:setNextFocusableComponent()之类的。自己查查javadoc。


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923