import javax.swing.*; /** * This class demonstrates some of the new features * of JJEdit 1.0. * These features include: *
  • a toolbar item to generate double-clickable .jar files. *
  • a toolbar item to generate javadoc comments. *
  • new icons. * */ public class Demo { /** * The main method - creates and displays a JFrame with a label. * The label can be set by providing a command-line argument. * */ private String message; public static void main (String[] args) { JLabel myLabel; JFrame myDemo = new JFrame(); if (args.length > 0) { myLabel = new JLabel((String)args[0]); } else { myLabel = new JLabel("Type a message in the command-line argument field"); } myDemo.getContentPane().add(myLabel); myDemo.show(); } /** * A method to return the message that will be displayed. * It returns a Message object if one has been set. * */ public String getMessage() { return(message); } /** * A method to set the message that will be displayed. * It expects an argument with a Message object. * */ public void setMessage(String message) { this.message = message; } }