public static void showBox(Component parent, String text, int type) { int typ=4; switch (type) { case 1: typ=JOptionPane.ERROR_MESSAGE; break; case 2: typ=JOptionPane.INFORMATION_MESSAGE; break; case 3: typ=JOptionPane.QUESTION_MESSAGE; break; case 4: typ=JOptionPane.WARNING_MESSAGE; break; } JOptionPane.showMessageDialog(parent, text, Define.getOwnName() + " " + Define.getVersionAsString(),typ);
public static void showBox(String text, int type) { showBox(null, text, type);
	public static void showBox(Component parent, String text, int type) {		int typ=4;		switch (type) {			case 1: typ=JOptionPane.ERROR_MESSAGE; break;			case 2: typ=JOptionPane.INFORMATION_MESSAGE; break;			case 3: typ=JOptionPane.QUESTION_MESSAGE; break;			case 4: typ=JOptionPane.WARNING_MESSAGE; break;		}		JOptionPane.showMessageDialog(parent, text, Define.getOwnName() + " " + Define.getVersionAsString(),typ);	}