Here you can find the source of createFrame(String title)
Parameter | Description |
---|---|
title | title of the frame |
private static JFrame createFrame(String title)
//package com.java2s; /*//from w w w .ja v a2 s . c o m * Copyright (C) 2017 Andreas Maier, Susanne Westphal * CONRAD is developed as an Open Source project under the GNU General Public License (GPL). */ import javax.swing.JFrame; public class Main { private static int FRAME_ID = 0; /** * creates a new JFrame * @param title title of the frame * @return the JFrame */ private static JFrame createFrame(String title) { JFrame frame = new JFrame(title + " (" + FRAME_ID++ + ")"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLocationRelativeTo(null); frame.setSize(500, 400); return frame; } }