package de.FeatureModellingTool;
import application.SingleFrameApplication;
import javax.swing.*;
import java.awt.*;
import java.util.EventObject;
import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.InsetsUIResource;
/**
* author: zhangwei
* Date: 2003-6-4
* Time: 21:00:41
*/
public class Main extends SingleFrameApplication {
public static void main(String[] args) {
launch(Main.class, args);
}
@Override
protected void initialize(String[] argv) {
UIManager.put("JXTitledPanel.titleForeground", new ColorUIResource(Color.BLACK));
UIManager.put("JXTitledPanel.captionInsets", new InsetsUIResource(3, 3, 3, 0));
}
@Override
protected void startup() {
ExitListener maybeExit = new ExitListener() {
public boolean canExit(EventObject e) {
Object source = (e != null) ? e.getSource() : null;
Component owner = (source instanceof Component) ? (Component) source : null;
int option = JOptionPane.showConfirmDialog(owner, "Really Exit?");
return option == JOptionPane.YES_OPTION;
}
public void willExit(EventObject e) {
}
};
addExitListener(maybeExit);
FeatureModellingFrame instance = null;
instance = new FeatureModellingFrame();
instance.setVisible(true);
this.setMainFrame(instance);
}
}