Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
if (jelem == null) {
			jelem= EditorUtility.getActiveEditorJavaInput();
		}
		if (jelem == null) {
			IProject[] projects= getWorkspaceRoot().getProjects();
			if (projects.length > 0) {
				jelem= JavaCore.create(projects[0]);
			}
		}
		return jelem;
	}
	
	/**
	 * Returns the recommended maximum width for text fields (in pixels)
	 * Not valid until entering createContent.
	 * Overwrite to change value.
	 */
	protected int getMaxFieldWidth() {
		return convertWidthInCharsToPixels(40);
	}
	
	
	/**
	 * Creates the controls for the container field. Expects a GridLayout with at least 3 columns.
	 * @param parent The parent composite
	 * @param nColumns The number of columns to span
	 */
	protected void createContainerControls(Composite parent, int nColumns) {
		fContainerDialogField.doFillIntoGrid(parent, nColumns);
		LayoutUtil.setWidthHint(fContainerDialogField.getTextControl(null), getMaxFieldWidth());