content: package com.alibaba.luaview.debugger;
  
  import java.awt.BorderLayout;
  import java.awt.Dimension;
  import java.awt.EventQueue;
  import java.awt.Toolkit;
  import javax.swing.JFrame;
  import javax.swing.JPanel;
  import javax.swing.JCheckBox;
  import javax.swing.event.ChangeListener;
  import javax.swing.event.ChangeEvent;
  
  public class MainFrame extends JFrame {
  
  	private static final long serialVersionUID = -7533358961826961149L;
  
  	private JPanel contentPane;
  
  	/**
  	 * Launch the application.
  	 */
  	public static void main() {
  		EventQueue.invokeLater(new Runnable() {
  			public void run() {
  				try {
  					Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
  					MainFrame frame = new MainFrame();
  					int h = frame.getHeight();
  					frame.setLocation(h, screenSize.height - h * 3 / 2);
  					 frame.setVisible(true);
  				} catch (Exception e) {
  					e.printStackTrace();
  				}
  			}
  		});
  	}
  
  	/**
  	 * Create the frame.
  	 */
  	public MainFrame() {
  		setResizable(false);
  		setTitle("调试器: 请再启动模拟器, 调试器会自动开始调试");
  		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  		setBounds(100, 100, 354, 120);
  		contentPane = new JPanel();
  		// contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
  		contentPane.setLayout(new BorderLayout(0, 0));
  		setContentPane(contentPane);
  
  		final JCheckBox checkBox = new JCheckBox("断开关闭调试窗口");
  		checkBox.addChangeListener(new ChangeListener() {
  			public void stateChanged(ChangeEvent e) {
  				Config.closeWhenConnectionEnd = checkBox.isSelected();
  			}
  		});
  		checkBox.setSelected(true);
  		contentPane.add(checkBox, BorderLayout.CENTER);
  	}
  
  }
  