JavaClaDZ Admin
Posts : 18 Join date : 2008-02-23 Age : 33
| Subject: [Tut-Source code]-very easy swing into{Hello from JavaSpace Fri Apr 18, 2008 7:37 am | |
| /** *Avery simple intro to swing. instead of saying hello to the world, javaspace is saying hello *to all of you!! */ - Code:
-
import java.awt.*; import javax.swing.*; /** * *www.javaspace.board-directory.net *swing intro very simple *A Hello from javaspace * */ public class helloFromJavaSpace { public static void main (String args[])throws Exception { JFrame frame = new JFrame("Hello from Javaspace"); JLabel label = new JLabel("javaspace.board-directory.net says Hello"); Container pane = frame.getContentPane();// Get content pane pane.setLayout( new FlowLayout() );// Set layout manager pane.add( label );// Add to pane frame.pack(); frame.setVisible(true); } } | |
|