Remove the Line No
Hi All,
I have one JTextArea , JList in a single JSplitPane ....when i enter
the data in TextArea the respective row no will be increased at left side in jlist .....and when i delete one line of Text from the TextArea automatically the row no in jlist need to be removed ....
How to achieve this functionality.....pls help me.
Thanks in advance
# 2
Hi Cramickr,
Thanks for your suggestion ...but Iam unable to get the
row numbers in left side jlist....can u please send the
code snippet to get it ?
My code is as follows....iam getting the no one only which is hard coded please verify this
<code>
final JTextArea EspeciesTmpespecienotas_especialesTxa = MiniFramework
.getTextArea(Notas_especialesTextConv);
EspeciesTmpespecienotas_especialesTxa.setRows(10);
final JList list = new JList();
list.setLayoutOrientation(JList.VERTICAL);
list.setEnabled(false);
final JSplitPane splitpane = new JSplitPane(
JSplitPane.HORIZONTAL_SPLIT, list,
EspeciesTmpespecienotas_especialesTxa);
splitpane.setDividerLocation(30);
splitpane.setDividerSize(2);
//final Object[] elnt = { "1" };
//list.setListData(elnt);
//Object[] elements = this.getListData(list);
splitpane.setOneTouchExpandable(true);
EspeciesTmpespecienotas_especialesTxa.setEditable(true);
EspeciesTmpespecienotas_especialesTxa.setLineWrap(true);
JScrollPane scroller = new JScrollPane(splitpane);
scroller
.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
scroller
.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
scroller.setRowHeaderView(list);
</code>
Thank you