TavernerPOS - Source Code

Clone: 

git clone http://www.librarysmith.co.uk/tavernerPOS

 

package com.floreantpos.util;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class PanelTester {
	public static boolean pack;
	public static int width;
	public static int height;

	public static void test(JPanel panel) {
		JFrame frame = new JFrame();
		frame.setContentPane(panel);
		if(pack)
		frame.pack();
		else {
			frame.setSize(width, height);
		}
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setVisible(true);
	}
}

Add comment
These comments are moderated so so won't be published until reviewed.