As for all JComponent classes, you can use InputMap and ActionMap to associate an Action object with a KeyStroke and execute the action under specified conditions. There are two methods for you to use:
ActionMap am = [JTable].getActionMap();// remove the enter key;[JTable].setActionMap(am);
ActionMap am = [JTable].getActionMap();// remove the enter key;[JTable].setActionMap(am);
解决方案 »
- 关于access数据库导入到SQL SERVER2005的问题
- 编写记事本时怎么样出现鼠标右击的菜单
- 请教超级高手,要怎么样把一张表中的100百万条记录的20万条记录,放到内存里
- 下面程序中addcomponent()函数参数数表中第四个和第五参数怎理解?
- 关于io中的read返回值-1的问题 高分求教
- 测CPU 主频,型号,使用率,风扇转速,温度,内存大小的这些软件的实现原来是什么 谢谢
- 请教关于接口的实现
- 4个月可否学会java?
- 请哪位给我e一份jdbc-odbc驱动,我找不到哪有下
- <<thinking in java>>中文电子版中没有源码和图表怎么办啊!
- JAVA的APPLET与VB怎么相连接
- 谁能告诉我classpath到底是干什么用的????
在继续问一个问题,
用程序设定table的一个单元格处于编辑状态,调用JTable的editAt()方法后,指定的单元格确实有了焦点,但是却没有光标。为什么?我想让它与用鼠标双击一个单元格一样的效果,即被编辑的单元格内有光标闪动,用程序如何做?试了半天都没成功:(