aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Help with using JCheckBox in JTable to return a value in another column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Help with using JCheckBox in JTable to return a value in another column" Watch "Help with using JCheckBox in JTable to return a value in another column" New topic
Author

Help with using JCheckBox in JTable to return a value in another column

Ak Smith
Greenhorn

Joined: Sep 16, 2010
Posts: 6
I have the following code...I am trying to use a JCheckBox in Column0 - if when selected will return a double value in Column2. I don't know where I am going wrong. Please advice....




thanks....
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3166
    
  47

"akimaki makiaki", please check your private messages regarding an important administrative matter.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

BeForthrightWhenCrossPostingToOtherSites
http://forums.sun.com/thread.jspa?threadID=5450640


luck, db
There are no new questions, but there may be new answers.
Ak Smith
Greenhorn

Joined: Sep 16, 2010
Posts: 6
Reposting this code so that it does not reference other classes. (also posted on forums.sun.com).

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
lucky I checked StackOverflow before posting the solution

http://stackoverflow.com/questions/3729286/jtable-jcheckbox-trying-to-use-a-checkbox-in-one-column-to-return-a-double-valu
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
Michael Dunn wrote:lucky I checked StackOverflow . . .
I shall repeat what Darryl Burke said earlier: tell the people on every site if you post in several places.
Ak Smith
Greenhorn

Joined: Sep 16, 2010
Posts: 6
Sorry Guys...I've just started with this. This is also posted on forums.sun.com and stackoverflow.

I have edited the code..but still cannot get a value to show up in column2. please advise.

thanks....

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> please advise.

no thanks.

my simple solution works exactly as per your description
(check one, other unchecks and vice-versa)

you've indicated that our time is unimportant to you,
similarly, you getting the solution is unimportant to me.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
and for anyone thinking of spending some time trying to fix the code,
here's his/her final post at the sun cross-post (posted some time ago)

"GOT IT !!! Here is the final code if somebody wants it for reference. Huge Help from Camickr - Thank You Very Much !!!"
Ak Smith
Greenhorn

Joined: Sep 16, 2010
Posts: 6
Hello Michael,
I'm sorry....not sure where it is that I ever mentioned or indicated that your time is unimportant to me ???

ciao
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2200
    
    7
I'm sorry....not sure where it is that I ever mentioned or indicated that your time is unimportant to me ???


The fact that you posted this on 3 forums (and didn't include links to each forum) indicates our time is unimportant. Think about it. What if someone in this forum takes the time to answer the question, but it has already been answered in another forum. Did that person just not waste their time?

Also, once you did get the answer in another forum, you didn't post the solution in the other to forums. So again, nobody knows an answer has been found and may spend time trying to provide and answer.

Questions should only be posted in a single forum. If you don't get an answer within a day then you can try another forum (of course including links to all postings).
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
Well done, whoever Camick ( ) is.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
But you are quite right to complain about multiple postings. I agree it is a waste of time which is not being paid for, as well as very discourteous to all who replied.
Ak Smith
Greenhorn

Joined: Sep 16, 2010
Posts: 6
Well...I apologize. But I've just started doing this - I'm sure you've realized that this is just my first or maybe second post. Maybe there is another way of putting this across than simply accusing. That is just not fair.

Rob....thanks again for your help.
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Ak Smith wrote:Well...I apologize. But I've just started doing this - I'm sure you've realized that this is just my first or maybe second post. Maybe there is another way of putting this across than simply accusing. That is just not fair.

No one's accusing, rather informing. Also, please read the FAQ's as it's all there, including the rationale behind these recommendations. This should be the first place to look before a first post here.
 
Don't get me started about those stupid light bulbs.
 
subject: Help with using JCheckBox in JTable to return a value in another column