i have draw ovals in java, , @ click change color. beginning tried change color after 20 ms, doesn't work. my code is: public class mycomponentnew extends frame { public graphics2d g2d; public mycomponentnew(string title) { super(title); setsize(400, 550); } @override public void paint(graphics g) { this.g2d = (graphics2d) g; this.g2d.setcolor(color.red); this.g2d.filloval(10, 55, 50, 100); } public void changecolor () { this.g2d.setcolor(color.blue); this.g2d.filloval(10, 55, 50, 100); } } and in class main method have: mycomponentnew m; m = new mycomponentnew("fereastra cu baloane"); m.setvisible(true); m.addwindowlistener(new windowadapter() { @override public void windowclosing(windowevent we) { system.exit(0); } }); try { thread.sleep(20); } catch(interruptedexception e) {} m.changecolor(); the color of oval remains red. ...
i writing program in fortran find velocity of parachuting person in relation time. keep getting error can't fix. new programming , appreciated. the error is v(i+1)=v(i)+[32-((c*v(i)*v(i))/m)]*(h) 1 error: incompatible ranks 0 , 1 in assignment @ (1) and program is program para integer :: real :: v(11) !velocity real :: q !initial velocity real :: h !time step real :: c !drag coefficient real :: m !mass ! gravity equal 32 ft/s^2 write (*,*)'enter time step' read(*,*)h write(*,*)'enter initial velocity' read(*,*)q write(*,*)'enter drag coefficient' read(*,*)c write(*,*)'enter mass' read(*,*)m i=1,10 ! 1 10, 1 being interval. end v(i+1)=v(i)+[32-((c*v(i)*v(i))/m)]*(h) q=v(1) end program you cannot use [] normal parenthesis in expressions. array constructor, [ items ] means array items elements. end do should after line.
after open vs ultimate 2012 c# solution in vs ultimate 2013 12.0.21005.1rel following warning: warning 1 found conflicts between different versions of same dependent assembly. please set "autogeneratebindingredirects" property true in project file. more information, see http://go.microsoft.com/fwlink/?linkid=294190 . energyms i follow microsoft link instructions. edited csproj file, adding following line: <autogeneratebindingredirects>true</autogeneratebindingredirects> when build solution again, following error: error list "app.config;obj\x86\debug\energyms.csproj.energyms.exe.config" invalid value "configfile" parameter of "generateapplicationmanifest" task. multiple items cannot passed parameter of type "microsoft.build.framework.itaskitem". energyms output window: c:\program files (x86)\msbuild\12.0\bin\microsoft.common.currentversion.targets(3243,9): error msb4094: ...
Comments
Post a Comment