aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTable Design ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable Design ??" Watch "JTable Design ??" New topic
Author

JTable Design ??

Rikard Qvarforth
Ranch Hand

Joined: Jul 10, 2001
Posts: 107
Hi folks !
I have been digging in to the javax.swing.table package latly. Im building an JTable with a column model and a tablemodel. And for each column i hava a diffrent renderer. The tablemodel is updatable with new data when the user clicks in the jtree i have. The reason why a buildt so many renderers are, that i cant have renderes based on the column class type, i need to set the different tooltips and so on for the spefic data.
But i feel like some controller logic is in the diffrent renderes and the init method who puts the hole kabang together just explode with crappy code. The hole package is static and has proceduel smell to it (maby its the writer of the code ) so i wonder if i can add a extra layer on top of the data model. Which adds the tooltips from a resource file and formats the values from the model.
And then the renderer just cast the value the the new interface and gets all the niffy piffy stuff . But how can i make the "datamapping to column" not so static ? i dont want some switch ??
Anyone out there who can this ?? feels like im lost in the dark looking for the right desing.
Many thanks !
//Rille
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable Design ??
 
Similar Threads
JTable
JTable
JTable + TableCellRenderer
inserting a JLabel to a JTable
Images in a JTable