是要比较win32和.net程序的差异吗?
1、win32是windows的本地代码,执行效率更高。可能没有姿兄贺win64的本地代码了!
2、.net是某种程度上的伪编译,迹派需要微软的虚拟机翻译执行,效率应该会低些,但是微软推广的东西,后续支持更长久,对微软的系统跨平台尘闷(这话是不是有点别扭!)。
JMenuItemadd(JMenuItemmenuItem)将指定菜单项添加到此菜单的末尾。JMenuItemadd(Strings)创建具有指定文本的菜单项漏和,并将其添加到此菜单的末尾。返缺盯//扮轿whereinstancevariablesaredeclared:JPopupMenupopup//wheretheGUIisconstructed://Createthepopupmenu.popup=newJPopupMenu()menuItem=newJMenuItem("Apopupmenuitem")menuItem.addActionListener(this)popup.add(menuItem)menuItem=newJMenuItem("Anotherpopupmenuitem")menuItem.addActionListener(this)popup.add(menuItem)//Addlistenertocomponentsthatcanbringuppopupmenus.MouseListenerpopupListener=newPopupListener()output.addMouseListener(popupListener)menuBar.addMouseListener(popupListener)classPopupListenerextendsMouseAdapter{publicvoidmousePressed(MouseEvente){maybeShowPopup(e)}publicvoidmouseReleased(MouseEvente){maybeShowPopup(e)}privatevoidmaybeShowPopup(MouseEvente){if(e.isPopupTrigger()){popup.show(e.getComponent(),e.getX(),e.getY())}}}完全可以,春派官方库仅支持WPF(Windows Presentation Foundation)图形开肆念发。我开发了System.Windows.Form库,和.NET Framework保持兼容,参见:http://blog.csdn.net/yefanqiu/article/details/5014548
此扒雹贺外又开发轻量级图形库TinyGUI,参见:http://blog.csdn.net/yefanqiu/article/details/5612682
http://blog.csdn.net/yefanqiu 博客上有不少.net mf UI的示例
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)