正在加载图片...
First Simple applet //WelcomeApplet java: Applet for displaying a message import javax. swing. *i public class WelcomeApplet extends JApplet I /* Initialize the applet * public void init() add (new JLabel(" Welcome to Java, JLabel center))i WelcomeApplet java: Applet for displaying a message import javax. swing. X public class WelcomeApplet extends JApplet i /*大工 ntia1 ize the applet*/ public WelcomeApplet () add (new jlabel(" Welcome to Java" jlabel center))i Liang, Introduction to Java Programming, Sixth Edition, (c)2005 Pearson Education, Inc. All rights reserved. 0-13-148952-6Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved. 0-13-148952-6 4 First Simple Applet // WelcomeApplet.java: Applet for displaying a message import javax.swing.*; public class WelcomeApplet extends JApplet { /** Initialize the applet */ public WelcomeApplet() { add(new JLabel("Welcome to Java", JLabel.CENTER)); } } // WelcomeApplet.java: Applet for displaying a message import javax.swing.*; public class WelcomeApplet extends JApplet { /** Initialize the applet */ public void init() { add(new JLabel("Welcome to Java", JLabel.CENTER)); } }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有