Java Code Examples for javax.swing.JFrame.setType()

The following are Jave code examples for showing how to use setType() of the javax.swing.JFrame class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: sentimental-analyzer   File: Analyzer.java   View Source Code Vote up 5 votes
/**
 * Initialize the contents of the frame.
 */
private void initialize() {
	frame = new JFrame();
	frame.setIconImage(Toolkit.getDefaultToolkit().getImage("E:\\图片\\u=1829416607,2140971604&fm=21&gp=0.jpg"));
	frame.setType(Type.UTILITY);
	frame.setTitle("网络电影评论情感倾向性分类");
	frame.setBounds(100, 100, 639, 412);
	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	
	JMenuBar menuBar = new JMenuBar();
	frame.setJMenuBar(menuBar);
	
	JMenu mnNewMenu = new JMenu("数据集自动标注");
	menuBar.add(mnNewMenu);
	
	JMenuItem mntmNewMenuItem_2 = new JMenuItem("自动标注");
	mnNewMenu.add(mntmNewMenuItem_2);
	
	JMenu mnNewMenu_1 = new JMenu("情感分析");
	menuBar.add(mnNewMenu_1);
	
	JMenuItem mntmNewMenuItem_3 = new JMenuItem("朴素贝叶斯算法");
	mnNewMenu_1.add(mntmNewMenuItem_3);
	
	JMenuItem mntmNewMenuItem_4 = new JMenuItem("N-Gram算法");
	mnNewMenu_1.add(mntmNewMenuItem_4);
	
	JMenuItem mntmNewMenuItem_5 = new JMenuItem("支持向量机");
	mnNewMenu_1.add(mntmNewMenuItem_5);
	
	JMenu mnNewMenu_2 = new JMenu("关于");
	menuBar.add(mnNewMenu_2);
	
	JMenuItem mntmNewMenuItem = new JMenuItem("作者");
	mnNewMenu_2.add(mntmNewMenuItem);
	
	JMenuItem mntmNewMenuItem_1 = new JMenuItem("New menu item");
	mnNewMenu_2.add(mntmNewMenuItem_1);
}