Java examples for Swing:JFrame
build JFrame
//package com.java2s; import javax.swing.*; import java.awt.*; public class Main { public static JFrame buildJFrame(JPanel panel) { JFrame frame = new JFrame("Quiz Card Builder"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(BorderLayout.CENTER, panel); frame.setSize(500, 600);/*w ww. j av a2s . c o m*/ frame.setVisible(true); return frame; } }