aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes a q about JTable, implementing a CellEditor and changing the ComponentOrienation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "a q about JTable, implementing a CellEditor and changing the ComponentOrienation" Watch "a q about JTable, implementing a CellEditor and changing the ComponentOrienation" New topic
Author

a q about JTable, implementing a CellEditor and changing the ComponentOrienation

Mahmoud Hadad
Ranch Hand

Joined: Jan 09, 2006
Posts: 67
hi evreyone,
i want to know how can i change the Orientation of my text from LEFT_To_RIGHT to RIGHT_TO_LEFT in JTable Cell's when editing. i have extended AbstractCellEditor and implemented TableCellEditor
and when i implemented getTableCellEditorComponent i used the method textField.setComponentOrientation in it, the text when editing is at right but the cell is not getting edited that is after i press F2 in the cell being edited. i have extended DefaultCellEditor and overrided setClickCountToStart and getClickCountToStart to zero but the cell is not getting edited till i press F2 too. i want to have my text in any cell in JTable to be right aligned when editing without pressing F2 to start editing, any hints?
i did implement my own Cell Editor and have extended JTextArea

[ October 09, 2006: Message edited by: Mahmoud Hadad ]
[ October 09, 2006: Message edited by: Mahmoud Hadad ]
Mahmoud Hadad
Ranch Hand

Joined: Jan 09, 2006
Posts: 67
ok the problem is solved by using the method jTableObj.prepareEditor but still the text gets an orientation from left to right and not getting from right to left although i used the method textField.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT) in the getTableComponent method, any hints?
[ October 09, 2006: Message edited by: Mahmoud Hadad ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: a q about JTable, implementing a CellEditor and changing the ComponentOrienation