建立gui应用程序(编辑修改稿)内容摘要:

ScrollPane ☆ ☆ ☆ ☆ ☆ ☆ TextArea ☆ ☆ ☆ ☆ ☆ ☆ TextField ☆ ☆ ☆ ☆ ☆ ☆ ☆ Window ☆ ☆ ☆ ☆ ☆ ☆ ☆ 7 如何创建菜单 1. 首先创建一个 MenuBar对象 , 并将其置于一个可容纳菜单的容器 (如 Frame对象 )中。 2. 创建一个或多个 Menu对象 , 并将它们添加到先前创建的 MenuBar对象中。 3. 创建一个或多个 MenuItem对象 , 再将其加入到各 Menu对象中 8 创建 MenuBar import .*。 public class TestMenuBar{ public static void main(String[] args) { Frame f = new Frame(MenuBar)。 MenuBar mb = new MenuBar()。 (mb)。 (200,150)。 (true)。 } } 9 创建 Menu import .*。 public class TestMenu{ public static void main(String[] args) { Frame f = new Frame(Menu)。 MenuBar mb = new MenuBar()。 (mb)。 Menu m1 = new Menu(File)。 Menu m2 = new Menu(Edit)。 Menu m3 = new Menu(Help)。 (m1)。 (m2)。 (m3)。 (150,120)。 (true)。 } } 10 创建 MenuItem import .*。 public class TestMenuItem{ public static void main(String[] args。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。