⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 templatemanagermain.java

📁 自动生成JAVA-Struts网站的程序
💻 JAVA
字号:
package com.sutternow.templates;import org.exolab.castor.xml.*;import com.sutternow.swingkar.gui.TemplateManagerPane;import com.javanovic.karapansapi.xml.Strutscreator;import javax.swing.*;import java.awt.*;import java.io.FileReader;import java.io.FileNotFoundException;import java.io.File;import java.net.URL;import net.sf.easylayouts.RowLayout;/** * Created by IntelliJ IDEA. * User: payne * Date: Aug 22, 2003 * Time: 11:14:38 AM * Just a test class for view the template manager without running the main Reog app. */public class TemplateManagerMain {  public static void main(String[] args) {        TemplatesDefs def = new TemplatesDefs();        Unmarshaller um = new Unmarshaller(def);      try {           URL configURL = def.getClass().getResource("/templates.xml");           System.out.println(configURL.getPath());          um.unmarshal(new FileReader(configURL.getPath()));       // def = (TemplatesDefs)Unmarshaller.unmarshal(TemplatesDefs.class, new FileReader("c:/test/templates.xml"));      } catch (MarshalException e) {          e.printStackTrace();  //To change body of catch statement use Options | File Templates.      } catch (ValidationException e) {          e.printStackTrace();  //To change body of catch statement use Options | File Templates.      } catch (java.io.IOException e) {          e.printStackTrace();  //To change body of catch statement use Options | File Templates.      }      JFrame frame = new JFrame("Bean Templates");       TemplateManagerPane tm = new TemplateManagerPane(def);        frame.setTitle("Bean Templates");        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();        frame.setSize(screenSize.width/2, screenSize.height/2);        Container panel = frame.getContentPane();        RowLayout rowLayout = new RowLayout(panel, 1, 25);        rowLayout.add(tm.getEditForm(), 0);        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        frame.show();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -