Summary

Java > Core SWING advanced programming > 7. TABLE EDITING > Summary

 

In this chapter we examined closely the JTable cell editing mechanism. As with rendering, there is default editing support built into JTable that is adequate for the most common types of data that you might include in a table. However, as we showed, if you know how the table controls the editing process, you can extend its capabilities.

After looking at the basic editing support and using it to create an editable version of the currency table that we first saw in the last chapter, we went on to examine how the editing process starts, what editing involves, and how a cell editing session is ended. Armed with this knowledge, we saw how to give the illusion that a table contains an active component such as a combo box or a button, even though the component is not actually there until an editing session starts. Finally, you saw how to take control during and at the ends of an editing session to allow the user to edit a cell and then move to the next editable cell by pressing the tab key, and have the table automatically complete the editing process for the first cell before initiating an edit on the target cell. This example is typical what you can achieve once you understand the internals of the tables editing support.

 

 



Core Swing
Core Swing: Advanced Programming
ISBN: 0130832928
EAN: 2147483647
Year: 1999
Pages: 55
Authors: Kim Topley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net