?
Solved

Jtable mouse event

Posted on 1998-09-14
2
Medium Priority
?
434 Views
Last Modified: 2008-03-06
How do youdetect a mouse double click on a row and allows the user to edit the row also after clicking the mouse.
And further more, if the user click once another event is
suppose to happen.
0
Comment
Question by:alvinwang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
msmolyak earned 150 total points
ID: 1224171
DefaultCellEditor class which covers text fileds, combo boxes and checkboxes (for editing table cells) allows you to specify number of clicks required to strat editing:
setClickCountToStart().

To modify that value, try obtaining the reference to a table cell editor (JTable.getCellEditor) and change that value.

If you need more control, you can make a cell renderer an mouse listener and count clicks (MouseEvent.getClickCount()). Set the cell in editing state when you need to (JTable.editCellAt()).
0
 
LVL 1

Author Comment

by:alvinwang
ID: 1224172
thanks , will check it out.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question