Java Code Examples for javax.swing.table.JTableHeader#dispatchEvent()
The following examples show how to use
javax.swing.table.JTableHeader#dispatchEvent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HeaderComponent.java From netbeans with Apache License 2.0 | 5 votes |
private void setupHeader(JTableHeader h) { h.setDraggedColumn(isSelected && isPressed ? getColumn() : null); MouseEvent e = isSelected && !isPressed ? new MouseEvent(h, MouseEvent.MOUSE_ENTERED, 1, 0, 1, 1, 0, false) : new MouseEvent(h, MouseEvent.MOUSE_EXITED, 1, 0, 0, 0, 0, false); h.dispatchEvent(e); }
Example 2
Source File: HeaderComponent.java From visualvm with GNU General Public License v2.0 | 5 votes |
private void setupHeader(JTableHeader h) { h.setDraggedColumn(isSelected && isPressed ? getColumn() : null); MouseEvent e = isSelected && !isPressed ? new MouseEvent(h, MouseEvent.MOUSE_ENTERED, 1, 0, 1, 1, 0, false) : new MouseEvent(h, MouseEvent.MOUSE_EXITED, 1, 0, 0, 0, 0, false); h.dispatchEvent(e); }