For example, doesn't it seem that the Java Doc for the getValueAt() method should mention that the type of object returned is used by the JTable to choose a default renderer to display the value,
Sorry for the rant.
Rob Camick wrote:
For example, doesn't it seem that the Java Doc for the getValueAt() method should mention that the type of object returned is used by the JTable to choose a default renderer to display the value,
No it shouldn't because the getValueAt() method is NOT used for this purpose.
If you read the JTable API for the getDeaultRenderer/Editor() methods you will see this is controlled by the column class.
Sorry for the rant.
I agree using a JTable is more complex then using other Swing components, but ranting is never a good idea. The fact that you don't understand the API or the tutorials or know how to search the forum/web for examples is a reflection on you, not on the information that is freely available.
No it shouldn't because the getValueAt() method is NOT used for this purpose.
The fact that you don't understand the API or the tutorials or know how to search the forum/web for examples is a reflection on you, not on the information that is freely available.
S Baker wrote:So I assume that the JTable is calling getValueAt() and checking the object type to choose a renderer.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Prime wrote:
S Baker wrote:So I assume that the JTable is calling getValueAt() and checking the object type to choose a renderer.
You assume wrong. As Pete said in his first reply to you, JTable is using the return value of it's model's getColumnClass() method to determine the renderer, not getValueAt().
I still don't understand the momentary left-shift of the checkbox when selecting. The code from JTable is:
My feeling is that a different kind of documentation would vastly improve the learning curve, save a lot of time, and improve productivity overall.
Rob Camick wrote:
I still don't understand the momentary left-shift of the checkbox when selecting. The code from JTable is:
What has that got to do with this question?
My feeling is that a different kind of documentation would vastly improve the learning curve, save a lot of time, and improve productivity overall.
Since you continue to rant when it is not called for I will continue to reply.
You didn't understand the tutorial or the API. You didn't understand Pete's explanation and you didn't understand my explanation. What is the common denominator here? Maybe you should be spending more time reading and understanding the information and less time ranting. We should not have to waste time repeating ourselves (and I sure won't in the future) when we answer a question.
What has that got to do with this question?
Since you continue to rant when it is not called for I will continue to reply.
You didn't understand the tutorial or the API. You didn't understand Pete's explanation and you didn't understand my explanation. What is the common denominator here? Maybe you should be spending more time reading and understanding the information and less time ranting. We should not have to waste time repeating ourselves (and I sure won't in the future) when we answer a question.
Don't get me started about those stupid light bulbs. |