aswing1

View Code
package
{
import flash.display.Sprite;
import org.aswing.ASColor;
import org.aswing.AsWingManager;
import org.aswing.FlowLayout;
import org.aswing.JButton;
import org.aswing.JLabel;
import org.aswing.JWindow;
import org.aswing.border.LineBorder;

public class Test extends Sprite
{
public function Test()
{
//初始化
AsWingManager.initAsStandard(this);
//容器
var window:JWindow = new JWindow();
window.setSizeWH(200,150);
window.setLocationXY(100,100);
window.setBorder(new org.aswing.border.LineBorder());
window.setBackground(new ASColor(0xFF0000));
window.getContentPane().setLayout(new FlowLayout());
window.show();
//组件
var button:JButton = new JButton();
button.setText("按钮");
button.setBackground(new ASColor(0xFFFF00));
window.getContentPane().append(button);

var label:JLabel = new JLabel();
label.setText("标签");
label.setForeground(new ASColor(0xFF0000));
window.getContentPane().append(label);
}
}
}
posted @ 2011-11-15 14:41  ndljava  阅读(151)  评论(0编辑  收藏  举报