43598

TableCellEditor doesn't show properly

Question:

Im having trouble editing a cell, i'll picture cause my english is not very good.

<img alt="problem" class="b-lazy" data-src="https://i.stack.imgur.com/RoHDZ.png" data-original="https://i.stack.imgur.com/RoHDZ.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

I add a TableCellEditor (extends a DefaultCellEditor, i know is not the best but the code is not mine). When i type letters are not ,

i tried to table.setRowsHeight(comp.getHeight()); works but i don't want this, i want the textfield fix in the row

So i tried to comp.setPreferredSize(comp.getWidth(),table.getRowsHeight()) but doesn't work as expected.

Answer1:

I encountered a similar issue when using the Nimbus look-and-feel. Removing the border by calling

JTextField#setBorder( null )

solved it

Recommend

  • Applying a MaskFormatter to a column in my JTable, but the mask is only used on the first cell I edi
  • Color specific row by rowid
  • Java - Change the color of some squares created with Graphics2D
  • Centering a texture LibGDX
  • Ruby Multiple OR Evaluations For String Value
  • sqlalchemy map table from mssql database with “prefix-namespaces”
  • How to create directory in php?
  • Retrieve User Stories and associated Test Cases with it
  • PHP OCI8 extensions not working with PHP 7 64 bit
  • Testing $http.get() requests in angular
  • How define differents stores for each cell combobox editor in a grid?
  • Is there an existing gem or script that converts numbers to comp-3/packed decimal format?
  • How to reduce image size into 1MB
  • In Laravel how to groupBy Url without parameter in the query
  • How to make image control button for each image inside the div using css and js?
  • ExtJs 4, what is the right way to Delete control from container and Remove it from the memory?
  • How to do custom filtering in Datatables with comma separated values?
  • How to show complete column as editable in extjs grid(cell editing)?
  • 500 internal server error in ruby on rails
  • Flask-Restful error: “as_view” method not inherited
  • Visual Studio 2008 and JavaScript brackets formatting
  • Ruby regex to remove all consecutive letters from string
  • Add spaces between words in spaceless string
  • composer dependency stating in doesn't have php-xsl
  • Layout design help Android
  • How to use JavaScript to determine whether a file exists in a directory?
  • ILMerge & Keep Assembly Name
  • Large data - storage and query
  • Akka Routing: Reply's send to router ends up as dead letters
  • WOWZA + RTMP + HTML5 Playback?
  • Unanticipated behavior
  • Comma separated Values
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Trying to get generic when generic is not available
  • How do I configure my settings file to work with unit tests?
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • IndexOutOfRangeException on multidimensional array despite using GetLength check
  • How can I remove ASP.NET Designer.cs files?
  • Binding checkboxes to object values in AngularJs
  • java string with new operator and a literal