Newbie! hehe.
I downloaded JBuilder 4. Then I went and I made a default aplet.
It came up with this Java code.
So then I decided I wanted to write something on the main screen.Code:package untitled1; import java.awt.*; import java.awt.event.*; import java.applet.*; import javax.swing.*; /** * Title: fdvdfs * Description: df * Copyright: Copyright (c) 2001 * Company: ds * @author dsf * @version 1.0 */ public class Applet1 extends JApplet { boolean isStandalone = false; /**Get a parameter value*/ public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) : (getParameter(key) != null ? getParameter(key) : def); } /**Construct the applet*/ public Applet1() { } /**Initialize the applet*/ public void init() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } /**Component initialization*/ private void jbInit() throws Exception { this.setSize(new Dimension(400,300)); } /**Start the applet*/ public void start() { } /**Stop the applet*/ public void stop() { } /**Destroy the applet*/ public void destroy() { } /**Get Applet information*/ public String getAppletInfo() { return "Applet Information"; } /**Get parameter info*/ public String[][] getParameterInfo() { return null; } //static initializer for setting look & feel static { try { //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } catch(Exception e) { } } }
I tried this:
That DID NOT WORK!!Code:public void start() { System.out.println("HI there!"); }
Can someone tell me how to write text on it?




Reply With Quote