English 中文(简体)
java/swing:在JTable, 显示潜在的下游目标行。
原标题:java/swing: showing potential drop target rows in a JTable

我想要将可用作目标的TopTargetListener付诸实施。 这是我想要做的:

@Override public void dragOver(DropTargetDragEvent event) {
    MyItem item = getMyItemFromTransferable(); 
    int nrows = item.getTableRowsRequiredForDrop();
    // now highlight rows in the table under the drop cursor.
}   

我怎么能够说明,JTable中的哪一个增长是位于DroopTargetDragEvent的曲线下的一个增长?

最佳回答

我认为:

int row = myTable.rowAtPoint(event.getLocation());
问题回答

暂无回答




相关问题
auto abbreviating JLabel

Anyone written a JLabel (extension/util/??) that automatically abbreviates the contents depending on it s preferred/visible size? much appreciated.

how can install swing/matisse on eclipse?

i tried this link: http://downloads.myeclipseide.com/downloads/products/eworkbench/discovery-6.0/ but i m fail how is this?

Java JTextField with input hint

I would like to add a hint value to my javax.swing.JTextField. It should look like Firefox rendering of <input type="text" title="bla">. This creates an edit field with the text bla in the ...

Swing Generator

I need to develop some java gui using swing. A few years ago I did develop a bit with swing. But it was pretty exhausting, you see, back than there weren t much tools to help you. But I do believe ...

Create a ImageIcon that is the mirror of another one

I ll like to know if there is a way to create a ImageIcon that is the mirror of another ImageIcon. Searching on Google, I found how to do it by using many AWT libraries. Is there a way to do it with ...

热门标签