“Constructs a new JMenu with the supplied string as its text and specified as a tear-off menu or not.”
是什么意思?
...全文
465打赏收藏
jmenu的简单问题
JMenu filemenu=new JMenu("file",true);不知这个boolen量有什么用? “Constructs a new JMenu with the supplied string as its text and specified as a tear-off menu or not.” 是什么意思?
摘自java doc, JMenu
Parameters:
s - the text for the menu label
b - can the menu be torn off (not yet implemented)
~~~~~~~~~~~~~~~~~~~~
恐怕要j2sdk1.4.1中才有用吧
A menu can optionally be a tear-off menu. A tear-off menu can be opened and dragged away from its parent menu bar or menu. It remains on the screen after the mouse button has been released. The mechanism for tearing off a menu is platform dependent, since the look and feel of the tear-off menu is determined by its peer. On platforms that do not support tear-off menus, the tear-off property is ignored.