javax.swing.JDialog.show()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(92)

本文整理了Java中javax.swing.JDialog.show()方法的一些代码示例,展示了JDialog.show()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDialog.show()方法的具体详情如下:
包路径:javax.swing.JDialog
类名称:JDialog
方法名:show

JDialog.show介绍

暂无

代码示例

代码示例来源:origin: log4j/log4j

public void show() {
 pack();
 minimumSizeDialog(this, 200, 100);
 centerWindow(this);
 super.show();
}

代码示例来源:origin: org.netbeans.api/org-openide-util

dialog.show();

代码示例来源:origin: org.netbeans.api/org-openide-util-ui

dialog.show();

代码示例来源:origin: freeplane/freeplane

@Override
  public void show() {
    initInternalConditionModel();
    success = false;
    super.show();
  }
}

代码示例来源:origin: org.n52.wps/52n-wps-install-wizard

/**
 * Convienence method that displays a modal wizard dialog and blocks until the dialog
 * has completed.
 * @return Indicates how the dialog was closed. Compare this value against the RETURN_CODE
 * constants at the beginning of the class.
 */    
public int showModalDialog() {
  
  wizardDialog.setModal(true);
  wizardDialog.pack();
  wizardDialog.show();
  
  return returnCode;
}

代码示例来源:origin: stackoverflow.com

public static void main(String[] args) {
   JFrame m = new JFrame("Hello");
   m.setSize(200,200);
   m.setVisible(true);
   for(int i=0;i<3;i++) {
     JDialog dlg = new JDialog(m,"Dialog",true);
     dlg.setSize(100,100);
     dlg.show();
   }
 }

代码示例来源:origin: stackoverflow.com

/**
 * This method shows an INFORMATION_MESSAGE type message dialog.
 *
 * @param parentComponent The component to find a frame in.
 * @param message The message displayed.
 */
public static void showMessageDialog(Component parentComponent, Object message){
 JOptionPane pane = new JOptionPane(message, INFORMATION_MESSAGE);
 JDialog dialog = pane.createDialog(parentComponent, null);
 dialog.show();   
}

代码示例来源:origin: org.softsmithy.lib/softsmithy-lib-swing

public Option showUp() {
  super.show();
  return getOption();
}

代码示例来源:origin: stackoverflow.com

public void foo () {
 JDialog jd = new JDialog(null);
 jd.setModal(true);
 ...
 jd.pack();
 jd.show();
 System.out.println("Shows after the dialog is closed");
}

代码示例来源:origin: stackoverflow.com

class MySpecialPanel extends JPanel {

  public MySpecialPanel() {

    JButton button = new JButton( new AbstractAction("Show") {
      public void actionPerformed(ActionEvent event) {
        JDialog dialog = new JDialog( (Window)getTopLevelAncestor(), "Some Title", Dialog.ModalityType.DOCUMENT_MODAL );
        dialog.add( new DialogPanel() );
        dialog.show();
      }
    });
  }
}

代码示例来源:origin: org.apache.uima/uimaj-tools

@Override
 public void actionPerformed(ActionEvent e) {
  button.setBackground(colorEditor.currentColor);
  colorChooser.setColor(colorEditor.currentColor);
  // Without the following line, the dialog comes up
  // in the middle of the screen.
  dialog.setLocationRelativeTo(button);
  dialog.show();
 }
});

代码示例来源:origin: freeplane/freeplane

@Override
  public void show() {
    Controller.getCurrentModeController().startTransaction();
    super.show();
  }
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public void show()
 {
  BuLib.computeMnemonics(getRootPane(),this);
  super.show();
 }
}

代码示例来源:origin: stackoverflow.com

MyPanel panel = new MyPanel();
JDialog dialog = new JDialog();
dialog.add(panel);
dialog.setIconImage(...);
dialog.show();

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui

public static Object showDialogOptions(final Component _parent, final String _title, final JOptionPane _optionPane) {
 final JDialog d = _optionPane.createDialog(_parent, _title);
 // en fait c'est juste pour avoir le joli icone en haut a gauche
 d.setResizable(true);
 d.setModal(true);
 d.pack();
 d.show();
 d.dispose();
 return _optionPane.getValue();
}

代码示例来源:origin: org.apache.activemq/activemq-all

public void show() {
 pack();
 minimumSizeDialog(this, 200, 100);
 centerWindow(this);
 super.show();
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

public void show() {
 pack();
 minimumSizeDialog(this, 200, 100);
 centerWindow(this);
 super.show();
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

public Object notify(NotifyDescriptor nd) {
  JDialog dialog = new StandardDialog(nd.getTitle(), true, nd, null, null);
  dialog.show();
  return nd.getValue() != null ? nd.getValue() : NotifyDescriptor.CLOSED_OPTION;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

public Object notify(NotifyDescriptor nd) {
  JDialog dialog = new StandardDialog(nd.getTitle(), true, nd, null, null);
  dialog.show();
  return nd.getValue() != null ? nd.getValue() : NotifyDescriptor.CLOSED_OPTION;
}

代码示例来源:origin: org.gosu-lang.gosu/gosu-editor

public static void showMessageNonModal( String strMsg, int iType )
{
 JOptionPane pane = new JOptionPane( StudioUtilities.wrapText( strMsg ), iType );
 JDialog dialog = pane.createDialog( null, "" );
 dialog.setModal( false );
 dialog.show();
 // Must set dialog back to modal after it displays because swing recycles the dialog
 // for ALL modal dialogs (!)
 dialog.setModal( true );
}

相关文章

JDialog类方法