tags:

views:

354

answers:

1

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.i.e 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

+1  A: 

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+.

Touko
Hai Thanks for ur answer I have used the code suggested by you.I am sending my code.Its working but he whole text is not displayed while typing in the cell.find my code give me the suggestion where to change the code so that whole text displays in the cell with out scroll after the first line
chaithu
find my code in this linkhttp://forums.sun.com/thread.jspa?messageID=10822453#10822453
chaithu