TableCellEditor doesn't show properly

南笙酒味 提交于 2019-12-11 18:57:54

问题


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

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.


回答1:


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

JTextField#setBorder( null )

solved it



来源:https://stackoverflow.com/questions/17279442/tablecelleditor-doesnt-show-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!