Yes.
Basically, in the custom model, the columns are represented by a list of custom types. On overriden methods like getColumnName() and getColumnCount( ), I simply interact with this list to return the appropriate value.
However, the column model of the JTable has no knowledge of this list of custom types. Because addColumn() is never called on it, it is not populated with any TableColumns. This poses a problem, since I...
User Profile
Collapse
-
JTable column model issues
Hi all. I've defined a custom TableModel so I can use custom types for my JTable. However, because of this, the table's TableColumnMode l is totally out of sync with the model (ie. it isn't populated with any column data at all. No TableColumns or anything). This is annoying, since I need some reference to TableColumn objects (to do some column header rendering stuff).
Are there any good tutorials or examples that show how to ensure... -
Problems with extending JTables
Hey guys, I'm having a few problems with a JTable subclass I'm making. The constructor:
Code:public CustomTable() { super(); TableColumn col = new TableColumn(); col.setCellRenderer(new CustomCellRenderer()); col.setHeaderValue("Blah"); DefaultTableModel model = ((DefaultTableModel)getModel()); [B]model.addColumn(col);[/B] getColumnModel().addColumn(col);
-
Custom Transfer type for drag and drop? (SWT)
Hi there,
At the moment I'm making an application where I drag an item in a List to a Canvas (all in SWT). However, I don't wish to use TextTransfer or ByteArrayTransf er for the drag and drop data transfer. I want to transfer a class defined by me (lets just call it myCustomObj). I've tried subclassing Transfer but I don't have a clue what to put inside Transfer's methods, particularly isSupportedType () and nativeToJava(). Can anyone help... -
SWT drag and drop problem
Hey ya'll, I have a Java application where I need to drag a string from a List widget onto a JGoView (SWT). Now, setting up the List as a DragSource works fine with no errors. However, whenever I try to set up the JGoView as the DropTarget, it gives me an error. See below:
Code:List myList = new List (shell, SWT.BORDER | SWT.V_SCROLL); DragSource dragSource = new DragSource(myList, DND.DROP_COPY); Transfer[] transferDataTypes
No activity results to display
Show More
Leave a comment: