GUIKit Example: Hello World
CodeExampleThis example displays the classic simple "Hello World" application using the GUIKit framework. Optional additional forms achieving the same resultThe following are other variants on the basic theme of specifying the user interface definition. Here we choose to pass arguments to the constructor of the label widget instead of setting the "text" property. Technically, even this version will work since frame and content panes will be automatically wrapped if not included. You could add extra layout options to center the text. The "Panel" and "Label" widget controls simply wrap the Java Swing controls, which we can also call directly, either the Swing or AWT versions: Here we also try this using an XML definition equivalent.
|