双击JTextArea如何实现自动滚屏功能? 用JScrollPane装它,然后,jTextArea.setLineWrap(true);it is easy! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 linewrap是自动换行吧……自动滚动,还是设置listener来做吧。 <SCRIPT LANGUAGE="javascript"><!--var currentpos,timer; function initialize() { timer=setInterval('scrollwindow()',10); } function sc(){ clearInterval(timer); } function scrollwindow() { currentpos=document.body.scrollTop; window.scroll(0,++currentpos); if (currentpos != document.body.scrollTop) sc(); } document.onmousedown=sc document.ondblclick=initializefunction GetIEVersion(){ try { if(!window.clientInformation)return false; if(window.clientInformation.appName.toLowerCase()!="microsoft internet explorer")return false; if(window.clientInformation.appVersion.toLowerCase().indexOf("msie")==-1)return false; var a=window.clientInformation.appVersion.toLowerCase().split(";"); for(var i=0;i<a.length;i++) { a[i]=a[i].replace(" ",""); if(a[i].indexOf("msie")==0) { var version=a[i].substr(4,a[i].indexOf(".")-2); return version; } } } catch(exception) { } return false;}function Init(){if(GetIEVersion()<5.5){ if(typeof(tacontent.length)=="number"&&tacontent.length>1) for(var i=0;i<tacontent.length;i++) handleElement(tacontent[i]); else handleElement(tacontent);}}function handleElement(element){ Handle(); function Handle() { var TimerID=0; var height=element.scrollHeight; if(height<10)//element.scrollHeight没有初始化 { TimerID=setTimeout(Handle,1000); return; } element.runtimeStyle.height=(height+10)+"px"; }}//--></SCRIPT> ibates里parameterClass里的值做什么用的 一段简单代码不理解,新手求解释 大家一起来帮帮我 先谢谢了 给单词表排个序 会的来帮个忙 通过光标键来移动画笔,而我的程序就是运行不出来,什么原因? 求助:关于swing中的JsplitPane的问题 问题解决就结贴,怎么样重载File类,错在哪里阿 谁知道JBUIDER 9的注册码啊? 各位大侠好,小弟请教了! 是否能用session bean来完成数据库查询! 谁知道JAVA中的SUPERCLASS(超级类别,台湾翻译)是什么? 请问一个c语言定义的数在java中怎样正确识别?
var currentpos,timer;
function initialize()
{
timer=setInterval('scrollwindow()',10);
}
function sc(){
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
function GetIEVersion()
{
try
{
if(!window.clientInformation)return false;
if(window.clientInformation.appName.toLowerCase()!="microsoft internet explorer")return false;
if(window.clientInformation.appVersion.toLowerCase().indexOf("msie")==-1)return false;
var a=window.clientInformation.appVersion.toLowerCase().split(";");
for(var i=0;i<a.length;i++)
{
a[i]=a[i].replace(" ","");
if(a[i].indexOf("msie")==0)
{
var version=a[i].substr(4,a[i].indexOf(".")-2);
return version;
}
}
}
catch(exception)
{
}
return false;
}
function Init(){if(GetIEVersion()<5.5)
{
if(typeof(tacontent.length)=="number"&&tacontent.length>1)
for(var i=0;i<tacontent.length;i++)
handleElement(tacontent[i]);
else
handleElement(tacontent);
}
}
function handleElement(element)
{
Handle();
function Handle()
{
var TimerID=0;
var height=element.scrollHeight;
if(height<10)//element.scrollHeight没有初始化
{
TimerID=setTimeout(Handle,1000);
return;
}
element.runtimeStyle.height=(height+10)+"px";
}
}
//--></SCRIPT>