permaculture playing cards
The moose likes Swing / AWT / SWT and the fly likes JTable and events Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable and events" Watch "JTable and events" New topic

JTable and events

Nathan Paris

Joined: Jun 21, 2000
Posts: 28
I have created a JTable and would like to know how to capture a selection event. I.e. when the user selects an item in the table I want to be alerted.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521

"JavaRanch, where the deer and the Certified play" - David O'Meara
erik bunn

Joined: Jun 17, 2001
Posts: 2
How about an extension of what Nathan is asking?
Say you need to select a cell (and perform whatever
actions you want), but you do NOT want the mouse
click to be passed to the (cell editor) component
within the cell?
Example: your cell editor is a JComboBox. When you click
on the cell where the drop button would be shown, you want
the unopened list to be displayed first, then let the user
click on the button if he really wants to change things.
I agree. Here's the link:
subject: JTable and events
It's not a secret anymore!