visual editor 初体验

emf-sdo-runtime-2.2.0
GEF-runtime-3.2
JEM-runtime-1.2.3_jem
VE-SDK-1.2.3_jem 中对应的features和plugins扔到eclipse对应的目录中去
.[安装后启动后始终没有"visual class"此项目,终于找到解决办法] 关闭eclipse.把Eclipse安装目录Configuration里除了Config.ini其他文件夹都删掉.


import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JTree;

public class Test extends JFrame {

private static final long serialVersionUID = 1L;

private JPanel jContentPane = null;

private JCheckBox jCheckBox = null;

private JLabel jLabel = null;

private JTree jTree = null;

/**
* This method initializes jCheckBox
*
* @return javax.swing.JCheckBox
*/
private JCheckBox getJCheckBox() {
if (jCheckBox == null) {
jCheckBox = new JCheckBox();
}
return jCheckBox;
}

/**
* This method initializes jTree
*
* @return javax.swing.JTree
*/
private JTree getJTree() {
if (jTree == null) {
jTree = new JTree();
}
return jTree;
}

/**
* @param args
*/
public static void main(String[] args) {
// TODO 自动生成方法存根
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Test thisClass = new Test();
thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
thisClass.setVisible(true);
}
});
}

/**
* This is the default constructor
*/
public Test() {
super();
initialize();
}

/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.setSize(300, 200);
this.setContentPane(getJContentPane());
this.setTitle("JFrame");
}

/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private JPanel getJContentPane() {
if (jContentPane == null) {
jLabel = new JLabel();
jLabel.setText("JLabel");
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
jContentPane.add(getJCheckBox(), BorderLayout.NORTH);
jContentPane.add(jLabel, BorderLayout.WEST);
jContentPane.add(getJTree(), BorderLayout.CENTER);
}
return jContentPane;
}

} // @jve:decl-index=0:visual-constraint="52,9"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值