List of utility methods to do JFrame
void | dispErrore(JFrame frame, String task, String mess) visualizzazione errori HTML JOptionPane.showMessageDialog(frame, formattaHTML(mess), ERR_TITLE, JOptionPane.ERROR_MESSAGE); |
void | display(JFrame parent, JInternalFrame dialog) Display a dialog centered within the given frame. center(parent, dialog); parent.getLayeredPane().add(dialog, JLayeredPane.POPUP_LAYER); dialog.setVisible(true); |
int | displayConfirmationMessage(JFrame parent, String message, String title) display Confirmation Message Object[] options = { "Yes", "No" }; return JOptionPane.showOptionDialog(parent, message, title, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]); |
void | displayError(Exception e, JFrame jFrame) display Error if (DEBUG) { e.printStackTrace(); } else { JOptionPane.showMessageDialog(jFrame, "Error Occurred: " + e.getMessage()); |
void | displayWindow(final JFrame window) display Window SwingUtilities.invokeLater(new Runnable() { @Override public void run() { window.setVisible(true); }); |
void | dispose(final JFrame frame) Schedule disposal of a frame (async). SwingUtilities.invokeLater(new Runnable() { public void run() { if (frame.isDisplayable()) frame.dispose(); }); |
void | doDisableActiveRenderingInEDT(final JFrame jFrame) do Disable Active Rendering In EDT jFrame.getRootPane().setOpaque(true); jFrame.setFocusTraversalKeysEnabled(true); jFrame.setIgnoreRepaint(false); doSetIgnoreRepaint(jFrame, false); |
void | drawHelpPanel(String helpToDisplay, final JFrame frame) draw Help Panel JPanel panel = new JPanel(); panel.setBackground(Color.black); panel.setBounds(10, 500, 780, 50); frame.getContentPane().removeAll(); JLabel helpLabel = new JLabel(helpToDisplay); helpLabel.setForeground(Color.white); panel.add(helpLabel); frame.add(panel); ... |
void | enable(final JFrame frame) Enable. frame.setGlassPane(new JPanel());
frame.getGlassPane().setVisible(false);
|
void | enterFullScreenIfPossible(JFrame mainAppFrame) enter Full Screen If Possible final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); final GraphicsDevice defaultScreenDevice = ge.getDefaultScreenDevice(); if (defaultScreenDevice.isFullScreenSupported()) { try { mainAppFrame.dispose(); fsFrameSize = mainAppFrame.getSize(); mainAppFrame.setSize(getScreenSize()); fsFrameUndecorated = mainAppFrame.isUndecorated(); ... |