Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Mahmoud Hadad
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic