|
|||||
|
|||||
Sample Scripts
This page contains an assortment of sample scripts, written in MVEL, to demonstrate the language: Sample 1 - Inline Array's and Foreach Loopcolors = {'red', 'green', 'blue'};
foreach (c : colors) {
System.out.println(c + "!");
}
Output:
Sample 2 - Swingimport javax.swing.JFrame; import javax.swing.JLabel; with (frame = new JFrame()) { title = "My Swing Frame", resizable = true } frame.contentPane.add(new JLabel("My Label")); frame.pack(); frame.visible = true; See a similar example of this script in the MVEL Shell, demonstrated here |
|||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||