#包创建

e802. 创建一个位置大小的JProgressBar组件

Aprogressbarwithanunknownmaximumtypicallydisplaysananimationuntilthetaskiscomplete.Note:Thepercentagedisplayshouldnotbeenabledwhenthemaximumisnotknown(e804显示JPr...

e801. 创建一个JProgressBar组件

Aprogressbarisusedtovisuallyindicatehowmuchataskhasbeenprogressed.Aprogressbarcanbeorientedhorizontally(left-to-right)orvertically(bottom-to-top).Bydefault,theo...

e806. 创建进程监听对话框

Acommonfeatureofauserinterfaceistoshowaprogressdialogthatvisuallydisplaystheprogressofalong-runningtask.Thedialogautomaticallydisappearswhenthetaskisdone.ThePro...

e810. 创建弹出菜单

finalJPopupMenumenu=newJPopupMenu();//CreateandaddamenuitemJMenuItemitem=newJMenuItem("ItemLabel");item.addActionListener(actionListener);menu.add(item);//Setth...
代码星球 ·2021-02-12

e811. 创建具有嵌套菜单的弹出式菜单

Seee810创建弹出菜单foranexampleonhowtodisplayapopupmenu.finalJPopupMenupopupMenu=newJPopupMenu();//CreateasubmenuwithitemsJMenusubmenu=newJMenu("SubMenu1");submenu.ad...

e814. 创建一个可监听选择状态的菜单项

AmenuitemcanreceivenotificationofselectionchangesbyoverridingitsmenuSelectionChanged()method.Seealsoe808建立菜单栏,菜单,菜单项.JMenuItemitem=newJMenuItem("Label"){//Thism...

e774. 创建JList组件

Bydefault,alistallowsmorethanoneitemtobeselected.Also,theselecteditemsneednotbecontiguous.Tochangethisdefault,seee781设置JList中的选择模式.Alistselectioneventisfiredwhe...
代码星球 ·2021-02-12

e739. 创建一个标签组件

//Thetextisleft-justifiedandverticallycenteredJLabellabel=newJLabel("TextLabel");//Thetextishorizontallyandverticallycenteredlabel=newJLabel("TextLabel",JLabel....

e559. 创建窗口

Aframeisacomponentcontainerthatdisplaysitscontentsinatop-levelwindowwithatitlebarandbuttonstoresize,iconify,maximize,andclosetheframe.UnlikemostSwingcontainers,...
代码星球 ·2021-02-12

e674. 创建并绘制加速图像

Imagesinacceleratedmemoryaremuchfastertodrawonthescreen.Thisexampledemonstrateshowtotakeanimageandmakeanacceleratedcopyofitandthenuseittodrawonthescreen.Theprob...

e668. 在一组像素中创建缓冲图像

ThisexampledemonstrateshowtoconvertabytearrayofpixelvaluesthatareindicestoacolortableintoaBufferedImage.Inparticular,theexamplegeneratestheMandelbrotsetinabyteb...

e660. 用一组像素创建图像

ThisexampledemonstrateshowtoconvertabytearrayofpixelvaluesthatareindicestoacolortableintoanImage.Inparticular,theexamplegeneratestheMandelbrotsetinabytebufferan...

e667. 在给定图像中创建缓冲图像

AnImageobjectcannotbeconvertedtoaBufferedImageobject.Theclosestequivalentistocreateabufferedimageandthendrawtheimageonthebufferedimage.Thisexampledefinesamethod...

e666. 创建缓冲图像

Abufferedimageisatypeofimagewhosepixelscanbemodified.Forexample,youcandrawonabufferedimageandthendrawtheresultingbufferedimageonthescreenorsaveittoafile.Abuffer...
代码星球 ·2021-02-11

e656. 创建基本图形

Shapeline=newLine2D.Float(x1,y1,x2,y2);Shapearc=newArc2D.Float(x,y,w,h,start,extent,type);Shapeoval=newEllipse2D.Float(x,y,w,h);Shaperectangle=newRectangle2D.Fl...
代码星球 ·2021-02-11
首页上一页...1213141516...下一页尾页