Works around a nasty bug in Java 1.6, where it clears the selection if the context/popup menu mouse trigger is clicked. It needs to refuse the cell selection in the case of a popup trigger.

by mrs, 19 Nov, 2009 10:21 AM
900 1037  
99 import javax.swing.*;
1010 import javax.swing.table.TableModel;
1111 import javax.swing.table.TableColumn;
12 import javax.swing.table.TableCellEditor;
1213 import java.awt.event.MouseEvent;
1314 import java.awt.event.MouseListener;
1415 import java.awt.Point;
------
2324 * Handle tooltips, at least.  A very cool feature.
2425 */
2526 public class AuctionTable extends JTable {
27   private static TableCellEditor FAUX = new FauxEditor();
28   public TableCellEditor getCellEditor() {
29     return FAUX;
30   }
2631 
2732   /**
2833    * @brief Constructs a JTable out of a prefix to search for in the