Factory method for create a {@link JDialog} object over the given {@link JOptionPane}.

@param parentComponent
the parent component
@param pane
the pane
@param title
the title
@return the new {@link JDialog}
336794
public static JDialog newJDialog(Component parentComponent, @NonNull JOptionPane pane,
		String title)
	{
		return parentComponent == null
			? pane.createDialog(parentComponent, title)
			: pane.createDialog(title);
	}
299441
protected ComponentContainer createContainer(@Nullable ComponentContainer parent) {
    if (parent == null) {
      return new ComponentContainer();
    }
    return parent.createChild();
  }
19489
function _createPaneIfNecessary(paneId) {
        var newPane;

        if (!_panes.hasOwnProperty(paneId)) {
            newPane = new Pane(paneId, _$el);
            _panes[paneId] = newPane;

            exports.trigger("paneCreate", newPane.id);

            newPane.$el.on("click.mainview dragover.mainview", function () {
                setActivePaneId(newPane.id);
            });

            newPane.on("viewListChange.mainview", function () {
                _updatePaneHeaders();
                exports.trigger("workingSetUpdate", newPane.id);
            });
            newPane.on("currentViewChange.mainview", function (e, newView, oldView) {
                _updatePaneHeaders();
                if (_activePaneId === newPane.id) {
                    exports.trigger("currentFileChange",
                                               newView && newView.getFile(),
                                               newPane.id, oldView && oldView.getFile(),
                                               newPane.id);
                }
            });
            newPane.on("viewDestroy.mainView", function (e, view) {
                _removeFileFromMRU(newPane.id, view.getFile());
            });
        }

        return newPane;
    }
275454
public int showDialog(Component parent) {
        dialogResultValue = ERROR_OPTION;
        JDialog dialog = createDialog(parent);
        dialog.addWindowListener(new WindowAdapter() {

            @Override
            public void windowClosing(WindowEvent e) {
                dialogResultValue = CANCEL_OPTION;
            }
        });

        dialog.setVisible(true);
        dialog.dispose();
        dialog = null;

        return dialogResultValue;
    }
872767
public CollapsiblePanel addToAccordion(String title, JComponent component) 
    {
        return addToAccordion(title, component, false);
    }
1028481
public static JInternalDialog createDialog (JFrame frame, JPanel content)
    {
        return createDialog(frame, null, content);
    }
909042
private static Window getWindowAncestor(JTextComponent component) {
        if (component == null) {
            return null;
        }
        return SwingUtilities.getWindowAncestor(component);
    }
231464
public static JInternalFrame newInternalFrame(final String title, final boolean resizable,
		final boolean closable, final boolean maximizable, final boolean iconifiable)
	{
		final JInternalFrame internalFrame = new JInternalFrame(title, resizable, closable,
			maximizable, iconifiable);
		return internalFrame;
	}
944172
public void doCreate(Composite parentComposite, IDialogSettings settings) {
		// Introduction
		final String introductionMessage = getIntroductionLabel();
		if (!Strings.isEmpty(introductionMessage)) {
			final GridData gd = new GridData();
			gd.grabExcessHorizontalSpace = true;
			gd.horizontalAlignment = GridData.FILL_HORIZONTAL;
			gd.horizontalSpan = 2;
			final Label textWidget = new Label(parentComposite, SWT.WRAP);
			textWidget.setLayoutData(gd);
			textWidget.setText(introductionMessage);
			textWidget.setFont(parentComposite.getFont());
		}
		//
		final GridData gd = new GridData(GridData.FILL_BOTH);
		gd.heightHint = HEIGHT_HINT;
		gd.widthHint = WIDTH_HINT;
		this.table = new Table(parentComposite, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
		this.table.setLayoutData(gd);
		this.table.setFont(parentComposite.getFont());
		this.table.setHeaderVisible(true);
		this.table.setLinesVisible(true);
		this.table.setLinesVisible(true);

		TableColumn column = new TableColumn(this.table, SWT.NULL);
		column.setText(getSourceColumnLabel());
		if (!this.isSortedElements) {
			column.addSelectionListener(new SelectionAdapter() {
				@SuppressWarnings("synthetic-access")
				@Override
				public void widgetSelected(SelectionEvent event) {
					sortBySourceColumn();
					AbstractConversionTable.this.list.refresh(true);
				}
			});
		}
		column.setWidth(DEFAULT_WIDTH);

		column = new TableColumn(this.table, SWT.NULL);
		column.setText(getTargetColumnLabel());
		if (!this.isSortedElements) {
			column.addSelectionListener(new SelectionAdapter() {
				@SuppressWarnings("synthetic-access")
				@Override
				public void widgetSelected(SelectionEvent event) {
					sortByTargetColumn();
					AbstractConversionTable.this.list.refresh(true);
				}
			});
		}
		column.setWidth(DEFAULT_WIDTH);

		this.list = new TableViewer(this.table);
		this.list.setLabelProvider(createLabelProvider());
		this.list.setContentProvider(createContentProvider());
		this.list.setUseHashlookup(true);

		this.list.addSelectionChangedListener(evt -> enableButtons());

		this.table.addKeyListener(new KeyAdapter() {
			@SuppressWarnings("synthetic-access")
			@Override
			public void keyPressed(KeyEvent event) {
				if (event.character == SWT.DEL && event.stateMask == 0) {
					if (AbstractConversionTable.this.removeButton.isEnabled()) {
						removeCurrentTypeConversion();
					}
				}
			}
		});

		this.editors = new CellEditor[2];
		this.editors[0] = createSourceColumnEditor();
		this.editors[1] = createTargetColumnEditor();
		this.list.setCellEditors(this.editors);

		this.cellModifier = createCellModifier();
		this.list.setColumnProperties(new String[] {SOURCE_COLUMN_PROPERTY, TARGET_COLUMN_PROPERTY});
		this.list.setCellModifier(this.cellModifier);

		final Composite buttons = SWTFactory.createComposite(parentComposite, parentComposite.getFont(), 1, 1,
				GridData.VERTICAL_ALIGN_BEGINNING, 0, 0);

		final Button addButton = SWTFactory.createPushButton(buttons, Messages.AbstractConversionTable_0, null);
		addButton.addListener(SWT.Selection, evt -> addTypeConversion(null, null, true));

		this.removeButton = SWTFactory.createPushButton(buttons, Messages.AbstractConversionTable_1, null);
		this.removeButton.addListener(SWT.Selection, evt -> removeCurrentTypeConversion());

		this.clearButton = SWTFactory.createPushButton(buttons, Messages.AbstractConversionTable_2, null);
		this.clearButton.addListener(SWT.Selection, evt -> removeAllTypeConversions());

		if (this.isSortedElements) {
			this.moveTopButton = SWTFactory.createPushButton(buttons, Messages.AbstractConversionTable_3, null);
			this.moveTopButton.addListener(SWT.Selection, evt -> moveSelectionTop());

			this.moveUpButton = SWTFactory.createPushButton(buttons, Messages.AbstractConversionTable_4, null);
			this.moveUpButton.addListener(SWT.Selection, evt -> moveSelectionUp());

			this.moveDownButton = SWTFactory.createPushButton(buttons, Messages.AbstractConversionTable_5, null);
			this.moveDownButton.addListener(SWT.Selection, evt -> moveSelectionDown());

			this.moveBottomButton = SWTFactory.createPushButton(buttons, Messages.AbstractConversionTable_6, null);
			this.moveBottomButton.addListener(SWT.Selection, evt -> moveSelectionBottom());
		}

		SWTFactory.createVerticalSpacer(parentComposite, 1);

		// Register the preference key(s)
		registerKey(getPreferenceKey());

		// Fill the content of the table
		updateControls();

		// Enable/disable the buttons
		enableButtons();

		// By default, sort by name
		restoreColumnSettings(settings);
	}
954452
public JComponent createScreenComponent(Converter fieldInfo)
    {
        int iRows = 1;
        int iColumns = fieldInfo.getMaxLength();
        if (iColumns > 40)
        {
            iRows = 3;
            iColumns = 30;
        }
        String strDefault = fieldInfo.toString();
        if (strDefault == null)
            strDefault = Constants.BLANK;

        JComponent component = null;
        if (iRows <= 1)
        {
            component = new JTextField(strDefault, iColumns);
            if (fieldInfo instanceof FieldInfo)
                if (Number.class.isAssignableFrom(((FieldInfo)fieldInfo).getDataClass()))
                    ((JTextField)component).setHorizontalAlignment(JTextField.RIGHT);
        }
        else
        {
            component = new JTextArea(strDefault, iRows, iColumns);
            component.setBorder(m_borderLine);
        }
        return component;
    }
388425
public void init(Object parent, Object record)
    {
    	super.init(parent, record);
    	
        this.setOpaque(false);
        this.setBorder(new EtchedBorder());
        
        this.setLayout(new BorderLayout());
        this.add(m_helpView = new JHelpView(this, null), BorderLayout.CENTER);
        this.add(m_iconArea = new JBaseToolbar(this, null)
	        {
	            private static final long serialVersionUID = 1L;
	            /**
	             * Add the buttons to this window.
	             * Override this to include buttons other than the default buttons.
	             */
	            public void addButtons()
	            {
	               //super.addButtons();
	               //addButton(ThinMenuConstants.HOME);
	               JButton button = addButton(null, ThinMenuConstants.CLOSE, ThinMenuConstants.CLOSE);
	               button.setOpaque(false);
	               button.setBorder(new LineBorder(Color.black, 1));
	             }
	        }, BorderLayout.NORTH);
        m_iconArea.setOpaque(false);
        
        m_helpView.getHtmlEditor().setHelpPane(this);
    }
410968
public static JFrame setupWindow( final JComponent component , String title, final boolean closeOnExit ) {
		BoofSwingUtil.checkGuiThread();

		final JFrame frame = new JFrame(title);
		frame.add(component, BorderLayout.CENTER);

		frame.pack();
		frame.setLocationRelativeTo(null); // centers window in the monitor
		if( closeOnExit )
			frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		return frame;
	}
101545
public static Component findParent(final Component childComponent,
		final Class<? extends Component> parentClass)
	{
		return findParent(childComponent, parentClass, true);
	}
23927
private void createLayout()
	{
		jlabelTitle = new JLabel(newLabelHelpText());
		getContentPane().add(jlabelTitle, BorderLayout.NORTH);
		// JTextArea Help:
		jtaHelp = new JTextArea(10, 10);
		jtpHelp = new JTextPane();
		jtpHelp.replaceSelection(helptext);
		jtaHelp.setText(helptext);
		jtaHelp.setCaretPosition(0);
		jtaHelp.setLineWrap(true);
		jtaHelp.setWrapStyleWord(true);
		jtaHelp.setEditable(false);
		jscrollPanejtaHelp = new JScrollPane(jtpHelp);
		getContentPane().add(jscrollPanejtaHelp, BorderLayout.CENTER);
		buttonClose = new JButton(newLabelCloseText());
		buttonClose.addActionListener(new DisposeWindowAction(this));
		final Panel unten = new Panel();
		unten.add(buttonClose, BorderLayout.WEST);
		getContentPane().add(unten, BorderLayout.SOUTH);

	}
1124711
public UIComponent createComponent(FacesContext context, Resource componentResource)
    {
        Application application = getMyfacesApplicationInstance(context);
        if (application != null)
        {
            return application.createComponent(context, componentResource);
        }
        throw new UnsupportedOperationException();
    }
895043
protected JScrollPane createScroller() {
    JScrollPane sp = new JScrollPane(tree, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    sp.setHorizontalScrollBar(null);
    sp.setName("TreePopup.scrollPane");
    sp.setFocusable(false);
    sp.getVerticalScrollBar().setFocusable(false);
    sp.setBorder(null);
    return sp;
  }
937041
private static void showAboutDialog(){

		JDialog dialog = new JDialog();

		dialog.setSize(new Dimension(300,300));

		String msg = "This viewer is based on <b>BioJava</b> and <b>Jmol</>. <br>Author: Andreas Prlic <br> ";
		msg += "Structure Alignment algorithm based on a variation of the PSC++ algorithm by Peter Lackner.";


		JEditorPane txt = new JEditorPane("text/html", msg);
		txt.setEditable(false);


		JScrollPane scroll = new JScrollPane(txt);

		Box vBox = Box.createVerticalBox();
		vBox.add(scroll);

		JButton close = new JButton("Close");

		close.addActionListener(new ActionListener(){
			@Override
			public void actionPerformed(ActionEvent event) {
				Object source = event.getSource();

				JButton but = (JButton)source;
				Container parent = but.getParent().getParent().getParent().getParent().getParent().getParent() ;

				JDialog dia = (JDialog) parent;
				dia.dispose();
			}
		});

		Box hBoxb = Box.createHorizontalBox();
		hBoxb.add(Box.createGlue());
		hBoxb.add(close,BorderLayout.EAST);

		vBox.add(hBoxb);

		dialog.getContentPane().add(vBox);
		dialog.setVisible(true);


	}