Package javax.swing

Examples of javax.swing.JDialog.pack()


        panelButtons.add(buttonCancel, gridBagConstraints);

        d.getContentPane().add(panelButtons, java.awt.BorderLayout.SOUTH);

        d.setModal(true);
        d.pack();
    d.setLocationRelativeTo(parent);

        d.setVisible(true);
       
        return result[0];
View Full Code Here


                    //it here.
                    dialog.setVisible(false);
                }
            }
        });
        dialog.pack();
        dialog.setVisible(true);

        String userChoice = (String) optionPane.getValue();
        if (userChoice.equals("Yes to All")) {
            overwriteAll.setValue(true);
View Full Code Here

            final JProgressBar prog = new JProgressBar();
            prog.setIndeterminate(true);
            final JDialog diag = new JDialog(panel.frame(), false);
            diag.getContentPane().add(prog, BorderLayout.CENTER);
            diag.pack();
            diag.setLocationRelativeTo(panel.frame());
            diag.setVisible(true);
            Thread t = new Thread(new Runnable() {
                public void run() {
                    AccessLinksForEntries.copyExternalLinksToDirectory(links,
View Full Code Here

            tab.addTab(LangageManager
                    .getProperty("statistic.sampling"), CategoryPanelCreator.createFor(collector
                    .getStatistic(), Statistic.MAP_SAMPLING, LangageManager
                    .getProperty("statistic.categorydescription.sampling")));
            dialog.getContentPane().add(tab);
            dialog.pack();
      // Center dialog.
      dialog.setLocationRelativeTo(null);
            dialog.setVisible(true);
        }
    }
View Full Code Here

            BorderLayout.SOUTH);
        final JDialog top = new JDialog(TreeViewFrame.this,
            "JTV Messages", false);
        top.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        top.setContentPane(inner);
        top.pack();
        top.setLocationRelativeTo(TreeViewFrame.this);
        top.setVisible(true);
      }
    });
    menubar.setMnemonic(KeyEvent.VK_M);
View Full Code Here

                if (localCancelAction != null && !commiter.isCommited()) {
                    localCancelAction.actionPerformed(null);
                }
            }
        });
        result.pack();
        // setSize(300, 300);
        DialogAligner.center(result, myMainFrame);
        result.setVisible(true);
    }
View Full Code Here

        bitmapPanel.setArrayFont(arraynameview.getFont());
        bitmapPanel.setIncludedArrayHeaders(arraynameview.getHeaderSummary().getIncluded());
        bitmapPanel.setIncludedGeneHeaders(textview.getHeaderSummary().getIncluded());
       
        final JDialog popup = new CancelableSettingsDialog(viewFrame, "Export to Image", bitmapPanel);
        popup.pack();
        popup.setVisible(true);
      }
    });
    menu.add(bitmapItem);
   
View Full Code Here

      }
      final JDialog dialog = optionPane.createDialog(parentComponent, controller.getDialogTitle());
      dialog.applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));
      dialog.setResizable(true);
      // Pack again because resize decorations may have changed dialog preferred size
      dialog.pack();
      dialog.setMinimumSize(getPreferredSize());
      // Add a listener that transfer focus to focusable field of texture panel when dialog is shown
      dialog.addComponentListener(new ComponentAdapter() {
          @Override
          public void componentShown(ComponentEvent ev) {
View Full Code Here

        buttonPanel.add(copyButton);
        buttonPanel.add(button);
        dialog.getRootPane().setDefaultButton(button);
        panel.add(buttonPanel, BorderLayout.SOUTH);
        dialog.setContentPane(panel);
        dialog.pack();
        dialog.setLocationRelativeTo(getOwner());
        dialog.setVisible(true);
    }
   
    private IBrowserComponent getActivePage() {
View Full Code Here

    }
    JDialog dialog = optionPane.createDialog(SwingUtilities.getRootPane((JComponent)parentView), dialogTitle);
    dialog.applyComponentOrientation(ComponentOrientation.getOrientation(Locale.getDefault()));   
    dialog.setResizable(true);
    // Pack again because resize decorations may have changed dialog preferred size
    dialog.pack();
    dialog.setMinimumSize(dialog.getPreferredSize());
    dialog.setVisible(true);
    dialog.dispose();
  }
}
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.