简体   繁体   中英

Increasing Cell Height with multiline,without Scrollbar in Jtable

Hai I am developing a standalone application using Java in which I am using a JTable.The problem is when I enter a multiline text,the entire text is not displayed in the cell while I am typing.I get a scroll when I type a multiline text.How can I get my whole text to be visible while I type.ie How can I increase my Cell width in JTable while I am Typing . But the entire text will displayed only when I click out of that Cell.Can someone help me how to solve this problem

Thank You Chaithu

You should try a custom TableCellRenderer with JTextArea for example. For typing you'll probably need similar TableCellEditor .

An example can be seen at Java Specialists' Newsletter : Multi-line cells in JTable in JDK 1.4+ .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM