Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RowListener problem

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

model.getValueAt(row, 2) is always null when the cell is empty
so as the other cells.
But the cells might be empty at times. So it looks like the valueChanged method is invoked when the mouse enters the cell, rather than leaving from it.
Any ideas on how to improve it?
Thanks
Jack
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd like to deliver the system these 2 weeks. I just got this only question left to be solved.
Any body help me accelerate this?
Thanks
Jack
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the easiest way to get a solution is to
*always* post a sample program that we can
copy/paste/compile/run/observe along with
the steps to reproduce the problem.

snippets/guesswork just wastes everyone's time.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Dunn wrote:the easiest way to get a solution is to
*always* post a sample program that we can
copy/paste/compile/run/observe along with
the steps to reproduce the problem.

snippets/guesswork just wastes everyone's time.


https://docs.google.com/open?id=0Byu1vVqeMEJ5UFhldUtsNFVyUlU

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.coderanch.com/t/345637/GUI/java/JTable-handle-Row-lost-focus

I'd want to do things that similiar to this.
An interactive JTable.

By the way, can a tableModel inherits from both rs2xml and DefaultTableModel?

Any ideas?
Thanks
Jack
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> I'd want to do things that similiar to this.

doesn't help in defining your problem.

I posted that the best way to get help/solutions is to post a sample program.

in your case a sample program *is* a frame/scrollpane/table, a couple of rows and columns,
hard-coded data if needed, the listener, and the steps to produce the problem.

a sample program *is not* 34 files, particularly when it's tied to a specific IDE.

> By the way, can a tableModel inherits from both rs2xml and DefaultTableModel?

you could always 'extend whatever implements AbstractTableModel', but that's gunna get messy.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic