表选择 « Swing « Java 教程

En
Java 教程
1. 语言基础
2. 数据类型
3. 操作符
4. 流程控制
5. 类定义
6. 开发相关
7. 反射
8. 正则表达式
9. 集合
10. 线
11. 文件
12. 泛型
13. 本土化
14. Swing
15. Swing事件
16. 二维图形
17. SWT
18. SWT 二维图形
19. 网络
20. 数据库
21. Hibernate
22. JPA
23. JSP
24. JSTL
25. Servlet
26. Web服务SOA
27. EJB3
28. Spring
29. PDF
30. 电子邮件
31. 基于J2ME
32. J2EE应用
33. XML
34. 设计模式
35. 日志
36. 安全
37. Apache工具
38. 蚂蚁编译
39. JUnit单元测试
Java
Java 教程 » Swing » 表选择 
14. 65. 表选择
14. 65. 1. ListSelectionModel rowSelMod = JTable.getSelectionModel();
14. 65. 2. ListSelectionModel colSelMod = JTable.getColumnModel().getSelectionModel();
14. 65. 3. JTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
14. 65. 4. JTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
14. 65. 5. JTable.setColumnSelectionAllowed(boolean b);
14. 65. 6. JTable.setRowSelectionAllowed(boolean b);
14. 65. 7. JTable.setCellSelectionEnabled(boolean b);
14. 65. 8. 处理选择和模型变化事件
14. 65. 9. 得到默认的选择模式:MULTIPLE_INTERVAL_SELECTION
14. 65. 10. 只允许单一选择
14. 65. 11. Allow selection to span one contiguous set of rows, visible columns, or block of cells
14. 65. 12. Allow multiple selections of rows, visible columns, or cell blocks (default)
14. 65. 13. 将选定内容扩展到包括所有单元格
14. 65. 14. Deselect a cell: cell (3,2), All cells in the row and column containing (3,2) are deselected.
14. 65. 15. Row selection is enabled, Get the indices of the selected rows
14. 65. 16. 被选定行选定的索引
14. 65. 17. 获得最大和最小范围内选定的单元格
14. 65. 18. 检查每个单元格中最大和最小值
14. 65. 19. 在一个表格禁用选则
14. 65. 20. Getting the Anchor Cell in a JTable Component
14. 65. 21. Toggles the selection state, if it were called again, it exactly reverses the first call.
www.java2java.com | Contact Us
Copyright 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.