Package javax.swing

Examples of javax.swing.JDialog.pack()


      aboutMenuItem = new JMenuItem();
      aboutMenuItem.setText("About");
      aboutMenuItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          JDialog aboutDialog = getAboutDialog();
          aboutDialog.pack();
          Point loc = getJFrame().getLocation();
          loc.translate(20, 20);
          aboutDialog.setLocation(loc);
          aboutDialog.setVisible(true);
        }
View Full Code Here


      final JLabel label = new JLabel(scale(icon));
      jd.add(label);

      jd.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
      jd.pack();
      jd.setVisible(true);

      image.deleteOnExit();
      dat.deleteOnExit();
    } catch (final Exception e) {
View Full Code Here

   * Note that there should be an entry in the templates Vector for
   * each entry in the properties Vector.
   */
  public void showEditorWindow(String title, String property, String template) {
    JDialog jd = (JDialog)getEditorFactory().createEditorWindow(title, property, template);
    jd.pack();
    applyNewWindowLocation(jd);
    jd.setVisible(true);
  }

  /**
 
View Full Code Here

   * Note that there should be an entry in the templates Vector for
   * each entry in the properties Vector.
   */
  public void showEditorWindow(String title, String property, String template) {
    JDialog jd = (JDialog)getEditorFactory().createEditorWindow(title, property, template);
    jd.pack();
    applyNewWindowLocation(jd);
    jd.setVisible(true);
  /*
    JInternalFrame jif = (JInternalFrame)getEditorFactory().createEditorWindow(title, property, template);
    getMessagePanel().add(jif);
View Full Code Here

    errorPanel.add(optionPane);
    errorPanel.add(scrollPane);

    dialog.setContentPane(errorPanel);
   
    dialog.pack();
    dialog.setVisible(true);

    if (status == FATAL_ERROR)
      System.exit(-1);
  }
View Full Code Here

    errorPanel.add(optionPane);
    errorPanel.add(scrollPane);

    dialog.setContentPane(errorPanel);
   
    dialog.pack();
    dialog.setVisible(true);

    if (status == FATAL_ERROR)
      System.exit(-1);
  }
View Full Code Here

        d.dispose();
      }
    }); */

    d.pack();
    d.setVisible(true);
  }

  private void setupUserPerspectives() {
    // first clear the toolbar
View Full Code Here

          d.dispose();
        }
      });
      //      jf.pack();
      //    jf.setVisible(true);
      d.pack();
      d.setLocationRelativeTo(KnowledgeFlowApp.this);
      d.setVisible(true);
    } catch (Exception ex) {
      ex.printStackTrace();
    }
View Full Code Here

          final JDialog jf = new JDialog((JDialog)SaverCustomizer.this.getTopLevelAncestor(),
              "Choose directory", true);
          jf.setLayout(new BorderLayout());
          jf.getContentPane().add(m_fileChooser, BorderLayout.CENTER);
          m_fileChooserFrame = jf;
          jf.pack();
          jf.setVisible(true);
        } catch (Exception ex) {
          ex.printStackTrace();
        }
      }
View Full Code Here

  public static JDialog launch(final JOptionPane optionPane, final String title) {
    final JDialog dialog = pack(optionPane, title);
    invokeLater(new Runnable() {
      @Override
      public void run() {
        dialog.pack();
        dialog.setVisible(true);
        dialog.dispose();
      }
    });
    pause(new Condition("JOptionPane is showing") {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.