/** * Calculate the middle position of a window relativ to */ public static Point calculateMiddlePosition(Window win) { return calculateMiddlePosition(null, win); }
public void run() { JOptionPane.showMessageDialog(SGUI.getWindowParent(ConversationPanel.this), text, "Message problem", JOptionPane.INFORMATION_MESSAGE); } });
public void run() { SGUI.showError(ControlCenterWindow.this, errortitle, errormessage, exception); } });
dia.setLocation(SGUI.calculateMiddlePosition(SGUI.getWindowParent(CertificatePanel.this), dia)); dia.setVisible(true);
SGUI.renderObject(g, comp, cellw, cellh, loc.getX(), loc.getY(), 1);
dia.setLocation(SGUI.calculateMiddlePosition(SGUI.getWindowParent(CertificatePanel.this), dia)); dia.setVisible(true);
tabs.addTab(getMessageTitle(msg), icons.getIcon("received_message"), scroll); tabs.setSelectedComponent(scroll); SGUI.adjustComponentSizes(ConversationPanel.this);
SGUI.renderObject(g, comp, cellw, cellh, loc.getX(), loc.getY(), 1);
/** * */ public static void main(String[] args) { JFrame fr = new JFrame(); fr.add(new MandelbrotPanel()); fr.setLocation(SGUI.calculateMiddlePosition(fr)); fr.pack(); fr.setVisible(true); } }
dia.setLocation(SGUI.calculateMiddlePosition(comp!=null? SGUI.getWindowParent(comp): null, dia)); dia.setVisible(true);
public void run() { JOptionPane.showMessageDialog(SGUI.getWindowParent(ConversationPanel.this), text, "Message problem", JOptionPane.INFORMATION_MESSAGE); } });
public void run() { SGUI.showError(ControlCenterWindow.this, errortitle, errormessage, exception); } });
tabs.setSelectedComponent(scroll); SGUI.adjustComponentSizes(ConversationPanel.this);
SGUI.renderObject(g, white_piece, cellw, cellh, x, y, 0); SGUI.renderObject(g, red_piece, cellw, cellh, x, y, 0); SGUI.renderObject(g, empty_field, cellw, cellh, x, y, 0);
/** * */ public void createGui() { JFrame f = new JFrame(); f.setLayout(new BorderLayout()); f.add(createPanel(), BorderLayout.CENTER); f.setLocation(SGUI.calculateMiddlePosition(f)); f.pack(); f.setVisible(true); }
parent = SGUI.getWindowParent(parent); final JDialog dia = parent instanceof Frame ? new JDialog((Frame)parent, "Enter Component Identifier", true) dia.setLocation(SGUI.calculateMiddlePosition((Window)parent, dia));
public void run() { String msg = SUtil.wrapText("No integer concurrency: "+e.getMessage()); JOptionPane.showMessageDialog(SGUI.getWindowParent(TestCenterPanel.this), msg, "Settings problem", JOptionPane.INFORMATION_MESSAGE); } });
public void actionPerformed(ActionEvent e) { try { Desktop.getDesktop().open(new File(fi.getFilePath()).getParentFile().getCanonicalFile()); } catch(IOException ex) { SGUI.showError(table, "Error Opening Folder", "Folder '"+new File(fi.getFilePath()).getParentFile().getName()+"'could not be opened.", ex); } } });
tabs.addTab(getMessageTitle(msg), icons.getIcon("received_message"), scroll); tabs.setSelectedComponent(scroll); SGUI.adjustComponentSizes(ConversationPanel.this);