#jS

js实现复选框全选和不选

<html><head><title></title></head><style></style><script>window.onload=function(){varoDiv=document.getElementByI...

js提取行间事件

<html><head><title></title></head>  <style>    #div1{      width:100px;      height:200px;      background:red;      }  <...
代码星球 代码星球·2021-02-12

js控制属性的两种方法

下面以控制css属性为例,html属性也是一样第一种  document.getElementById('div1').style.display='block'第二种  document.getElementById('div1').style['display']='bloc...

js实现放在div上显示,离开隐藏

鼠标放在文字上显示,离开文字隐藏,代码如下<html><head><title></title></head><style>#div1{width:100px;height:200px;background:red;display:none;}&l...

e825. 当JSplitPane改变大小时分配空间

Theweightofasplitpanecontrolsthebehaviorofthedividerwhenthesplitpaneisresized.Iftheweightis0,allextraspaceisgiventotherightorbottomcomponent.Iftheweightis1,alle...

e823. 创建JSplitPane

Asplitpanedividesitsspacebetweentwocomponents.Thesplitpanecontainsadividerthatallowstheusertocontroltheamountofspacedistributedtoeachcomponent.//Createaleft-rig...
代码星球 代码星球·2021-02-12

e824. 获得和设置JSplitPane中的子组件

//Createaleft-rightsplitpaneJSplitPanehpane=newJSplitPane(JSplitPane.HORIZONTAL_SPLIT,leftComponent,rightComponent);//Createatop-bottomsplitpaneJSplitPanevpane=...

e827. 设置JSplitPane中分隔物的大小

Adividercanbenolessthanonepixelinsize.//Createaleft-rightsplitpaneJSplitPanepane=newJSplitPane(JSplitPane.HORIZONTAL_SPLIT,leftComponent,rightComponent);//Getcu...

e826. 获得和设置JSplitPane分开的位置

Thelocationofadividerismeasuredinpixelsfromeithertheleftedge(inthecaseofahorizontalsplitpane)orthetopedge(inthecaseofaverticalsplitpane).Therearetwowaystosetthe...

e788. 取消JSpinner的键盘编辑能力

//CreateanummberspinnerJSpinnerspinner=newJSpinner();//DisablekeyboardeditsinthespinnerJFormattedTextFieldtf=((JSpinner.DefaultEditor)spinner.getEditor()).getTe...

e790. 设置JSpinner的边框

//CreateanumberspinnerJSpinnerspinner=newJSpinner();//GetthetextfieldJFormattedTextFieldtf=((JSpinner.DefaultEditor)spinner.getEditor()).getTextField();//Setthe...
代码星球 代码星球·2021-02-12

e789. 限制用JSpinner实现数字选择的值

//Createanumberspinnerthatonlyhandlesvaluesintherange[0,100]intmin=0;intmax=100;intstep=5;intinitValue=50;SpinnerModelmodel=newSpinnerNumberModel(initValue,min,...

e787. 用JSpinner实现小时选择

//CreateacalendarobjectandinitializetoaparticularhourifdesiredCalendarcalendar=newGregorianCalendar();calendar.set(Calendar.HOUR_OF_DAY,13);//1pm//Createadatesp...

e793. 监听JSpinner数据变化

//CreateanummberspinnerJSpinnerspinner=newJSpinner();//Addthelistenerspinner.addChangeListener(newSpinnerListener());//Changingthevalueprogrammaticallyalsofires...

e791. 为JSpinner定制编辑器

Thisexamplereplacesthedefaulteditor(aJFormattedTextField)inaspinnercomponentwithacustomeditor.Thecustomeditorissimplyapanelthatdisplaysacolor.Thenameofthecolort...
首页上一页...4849505152...下一页尾页