当前位置:考试网  > 试卷库  > 学历类  > 自考  > 自考专业(计算机网络)  > Java语言程序设计一  > 已知Graphics对象g,获得Graphics2D对象g2d,然后,用圆角长方形类创建对象circle,该对象的左上角坐标是(30,40),半径是50。请写出实现以上要求的Java代码。
试题预览

已知Graphics对象g,获得Graphics2D对象g2d,然后,用圆角长方形类创建对象circle,该对象的左上角坐标是(30,40),半径是50。请写出实现以上要求的Java代码。

查看答案
收藏
纠错
正确答案:

Graphics2D g2d = (Graphics2D)g;RoundRectangle2D circle = new RoundRectangle2D.Double(30,40,100,100,100);

答案解析:

暂无解析

你可能感兴趣的试题

请写出package语句和import语句的区别。

以下Java程序代码中,能正确创建数组的是()。

以下标识符中,不是Java语言关键字的是()。

以下方法中,不能实现挂起线程的是()。

以下能作为表示线程优先级的数值,并且级别最低的是()。

热门试题 更多>
试题分类: 初级(口语)
练习次数:0次
1.Thefailureofahigh-profilecholesteroldrughasthrownaspotlightonthecomplicatedmachinerythatregulatescholesterollevels.Butmanyresearchersremainconfidentthatdrugstoboostlevelsof'good'cholesterolarestilloneofthemostpromisingmeanstocombatspirallingheartdisease. 2.DrugcompanyPfizerannouncedon2Decemberthatitwascancellingallclinicaltrialsoftorcetrapib,adrugdesignedtoraiseheart-protectivehigh-densitylipoproteins(HDLs).Inatrialof15000patients,asafetyboardfoundthatmorepeoplediedorsufferedcardiovascularproblemsaftertakingthedrugplusacholesterol-loweringstatinthanthoseinacontrolgroupwhotookthestatinalone. 3.Thenewscameasakickintheteethtomanycardiologistsbecauseearliertestsinanimalsandpeoplesuggesteditwouldlowerratesofcardiovasculardisease."Therehavebeennoredflagstomyknowledge,"saysJohnChapman,aspecialistinlipoproteinsandatherosclerosisattheNationalInstituteforHealthandMedicalResearch(INSERM)inPariswhohasalsostudiedtorcetrapib."Thiscancellationcameasacompleteshock." 4.TorcetrapibisoneofthemostadvancedofanewbreedofdrugsdesignedtoraiselevelsofHDLs,whichferrycholesteroloutofartery-cloggingplaquestotheliverforremovalfromthebody.Specifically,torcetrapibblocksaproteincalledcholesterolestertransferprotein(CETP),whichnormallytransfersthecholesterolfromhigh-densitylipoproteinstolowdensity,plaque-promotingones.Statins,incontrast,mainlyworkbyloweringthe'bad'low-densitylipoproteins. Underpressure 5.Researchersarenowtryingtoworkoutwhyandhowthedrugbackfired,somethingthatwillnotbecomeclearuntiltheclinicaldetailsarereleasedbyPfizer.Onehintliesinevidencefromearliertrialsthatitslightlyraisesbloodpressureinsomepatients.Itwasthoughtthatthismildproblemwouldbeoffsetbytheheartbenefitsofthedrug.Butitispossiblethatitactuallyprovedfatalinsomepatientswhoalreadysufferedhighbloodpressure.Ifbloodpressureistheexplanation,itwouldactuallybegoodnewsfordrugdevelopersbecauseitsuggeststhattheproblemsarespecifictothiscompound.OtherprototypedrugsthatarebeingdevelopedtoblockCETPworkinaslightlydifferentwayandmightnotsufferthesamedownfall. 6.ButitisalsopossiblethatthewholeideaofblockingCETPisflawed,saysMotiKashyap,whodirectsatherosclerosisresearchattheVAMedicalCenterinLongBeach,California.WhenHDLsexcretecholesterolintheliver,theyactuallyrelyonLDLsforpartofthisprocess.SoinhibitingCETP,whichpreventsthetransferofcholesterolfromHDLtoLDL,mightactuallycauseanabnormalandirreversibleaccumulationofcholesterolinthebody."You'reblockingaphysiologicmechanismtoeliminatecholesterolandeffectivelyconstipatingthepathway,"saysKashyap.Goingup 7.Mostresearchersremainconfidentthatelevatinghighdensitylipoproteinslevelsbyonemeansoranotherisoneofthebestroutesforhelpingheartdiseasepatients.ButHDLsarecomplexandnotentirelyunderstood.Oneapproveddrug,calledniacin,isknowntobothraiseHDLandreducecardiovascularriskbutalsocausesanunpleasantsensationofheatandtingling.Researchersareexploringwhethertheycanbypassthissideeffectandwhetherniacincanlowerdiseaseriskmorethanstatinsalone.Scientistsarealsoworkingonseveralothermeanstobumpuphigh-densitylipoproteinsby,forexample,introducingsyntheticHDLs."Theonlythingweknowisdeadinthewateristorcetrapib,notthewholeideaofraisingHDL,"saysMichaelMiller,directorofpreventivecardiologyattheUniversityofMarylandMedicalCenter,Baltimore. Questions7-13 Matchtorcetrapib,HDLs,statinandCETPwiththeirfunctions(Questions8-13)..WritethecorrectletterA,B,CorDinboxes8-13onyouranswersheet.NBYoumayuseanylettermorethanonce. 7.Ithasbeenadministeredtoover10,000subjectsinaclinicaltrial. 8.Itcouldhelpridhumanbodyofcholesterol. 9.Researchersareyettofindmoreaboutit. 10.Itwasusedtoreducethelevelofcholesterol. 11.AccordingtoKashyap,itmightleadtounwantedresultifit'sblocked. 12.Itproducedcontradictoryresultsindifferenttrials. 13.ItcouldinhibitLDLs.Listofchoices A.TorcetrapicB.HDLSC.StatinD.CETP
试题分类: 阅读
练习次数:2次
试题分类: 初级(口语)
练习次数:0次
试题分类: 初级(口语)
练习次数:2次
试题分类: 初级(口语)
练习次数:0次
扫一扫,手机做题