Select an item in the table and see this item highlighted. But if you following the steps listed below, you can actully select to make the table to be allowed only for single selection tSelectionMode(ListSelectionModel.SINGLE_SELECTION) Normally you can only select one item in the table since a call The following piece of code will create a window with a table That one does expect multiple items can be highlighted when only Here is the piece of code that generates the table, run it andįollow the steps to reproduce the problem. Drag the mouse pointer up and down, and multiple items can be selected, event for SINGLE_SELECTION.Ĭlassic VM (build JDK-1.2.2-W, native threads, symcjit) When the mouse pointer leaves the originally selected item, the originally selected item will be highlighted again. While holding down the mouse button, and drag the mouse pointer up or down. Press down the left mouse button and hold it down. ![]() Hold down the Control key and move the mouse pointer on the highlighted item. Select an item in the table and see this item highlighted.Ĥ. ![]() Add at least 3 items, the more the better to reproduce the problem, in the table and display this table in a window.ģ. ![]() tSelectionMode(ListSelectionModel.SINGLE_SELECTION) Ģ. Create a JTable and set the selection mode to SINGLE_SELECTION
0 Comments
Leave a Reply. |