Click here to Skip to main content
15,939,960 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to display multiline textbox in netbeans?

Share this answer
Amalachris 7-Dec-12 4:11am    
that one for default input and have some issues(no horizontal bar, appears out on the bottom of the textarea control).... :(
Add the below script to the <head> section of your page:

<script type="text/javascript">
function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)

Inside any textarea you wish to add a "maxlength" attribute to, simply do the following:

<textarea maxlength="40"  önkeyup="return ismaxlength(this)"></textarea></script></head>
Share this answer
Richard MacCutchan 7-Dec-12 5:00am    
What does this have to do with Java?
Amalachris 11-Dec-12 2:50am    
i want to display a Multiline textbox in my page.. i have this doubt while doing a project in java... wats wrong in this????
Richard MacCutchan 11-Dec-12 3:22am    
What you have posted is not Java it is Javascript, there is a big difference.
Amalachris 11-Dec-12 3:48am    
ya it is.. i just want a solution to display multiline textbox in netbeans... i got that script which is enough for my requirement...
Richard MacCutchan 11-Dec-12 4:25am    
This is not Java, look at the first line where it says <script type="text/javascript">.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900