Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Advanced-java] Swing table rendering


  • From: rajesh.singh@xxxxxx (Singh, Rajesh)
  • Subject: [Advanced-java] Swing table rendering
  • Date: Fri, 30 Mar 2001 13:32:44 -0500

Nice idea and I think it will solve my problem.

> -----Original Message-----
> From: Deever, Chris C. [mailto:Chris.Deever@xxxxxxxxx]
> Sent: Friday, March 30, 2001 1:30 PM
> To: 'Singh, Rajesh'; 'advanced-java@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: RE: [Advanced-java] Swing table rendering
> 
> 
> Raj,
> 
> I would suggest creating a new class that encapsulates the 
> differences of
> the values and then build a custom renderer for that class.
> 
> The class would contain three methods setData(String), 
> setData(float) and
> setData(Date).  The class would also contain an "Object getData()".  
> 
> Your renderer can do call the class's Object getData() and 
> decide how to
> handle it based on instanceof the object that was returned.
> 
> Just a thought...hope that helps!
> 
> Chris
> 
> 
> -----Original Message-----
> From: Singh, Rajesh [mailto:rajesh.singh@xxxxxx]
> Sent: Friday, March 30, 2001 1:21 PM
> To: 'advanced-java@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: [Advanced-java] Swing table rendering
> 
> 
> Is it possible to somehow hack JTable and install different 
> renderers for
> the same column. I have a typcical scenario where the values 
> in particular
> column can be either float or String or Date.
> Any ideas?????
> 
> Raj
> 
> 
> Rajesh Singh
> Analyst 
> Goldman Sachs
> 10 Hanover Square
> NY 10004
> 212-855-6151
> 
> 
> _______________________________________________
> Advanced-java mailing list
> Advanced-java@xxxxxxxxxxxxxxxxxxxxxx
> http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java
>