List of usage examples for javax.swing JRootPane ERROR_DIALOG
int ERROR_DIALOG
To view the source code for javax.swing JRootPane ERROR_DIALOG.
Click Source Link
From source file:com.ixora.common.ui.ShowExceptionDialog.java
/** * Initializes this dialog./* w w w . j a v a2 s . c o m*/ */ private void initialize() { this.eventHandler = new EventHandler(); setSize(smallSize); setTitle(MessageRepository.get(Msg.COMMON_UI_TEXT_ERROR)); if (isDefaultLookAndFeelDecorated()) { getRootPane().setWindowDecorationStyle(JRootPane.ERROR_DIALOG); } textExceptionLong = UIFactoryMgr.createHtmlPane(); textExceptionLong.setBorder(BorderFactory.createEmptyBorder(6, 6, 6, 6)); textExceptionLong.setEditable(false); textExceptionLong.addHyperlinkListener(this.eventHandler); textExceptionShort = UIFactoryMgr.createTextField(); textExceptionShort.setHorizontalAlignment(JTextField.CENTER); textExceptionShort.setBorder(null); textExceptionShort.setEditable(false); panel = new JPanel(new CardLayout()); JScrollPane s = UIFactoryMgr.createScrollPane(); s.setBorder(null); s.setViewportView(textExceptionLong); panel.add(s, "long"); panel.add(textExceptionShort, "short"); // set background color to the color of the panel textExceptionShort.setBackground(panel.getBackground()); textExceptionLong.setBackground(panel.getBackground()); buildContentPane(); }