wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable and events" Watch "JTable and events" New topic
Author

JTable and events

Nathan Paris
Greenhorn

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.
Thanks
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
http://java.sun.com/docs/books/tutorial/uiswing/events/listselectionlistener.html


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

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JTable and events
 
Similar Threads
jtable
JTable
JTable
jtable
JTable