BasicErrorPaneUI extends ErrorPaneUI { @Override public JFrame getErrorFrame(Component owner) { reinit(); expandedHeight = 0; collapsedHeight = 0; JXErrorFrame frame = new JXErrorFrame(pane); centerWindow(frame, owner); return frame; }  static ComponentUI createUI(JComponent c); @Override void installUI(JComponent c); @Override void uninstallUI(JComponent c); @Override JFrame getErrorFrame(Component owner); @Override JDialog getErrorDialog(Component owner); @Override JInternalFrame getErrorInternalFrame(Component owner); @Override Dimension calculatePreferredSize();  }
@Test public void testGetErrorFrameNull() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run - headless environment"); return; } assertNotNull(ui.getErrorFrame(null)); }
@Test public void testGetErrorFrameFrame() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run - headless environment"); return; } assertNotNull(ui.getErrorFrame(new JFrame())); }
@Test public void testGetErrorFrameDialog() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run - headless environment"); return; } assertNotNull(ui.getErrorFrame(new JDialog())); }
@Test public void testGetErrorFrameContentPane() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run - headless environment"); return; } JFrame frame = new JFrame(); assertNotNull(ui.getErrorFrame(frame.getContentPane())); }
@Test public void testGetErrorFrameJPanel() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run - headless environment"); return; } assertNotNull(ui.getErrorFrame(new JPanel())); }
@Test public void testGetErrorFrameApplet() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run - headless environment"); return; } assertNotNull(ui.getErrorFrame(new Applet())); }
@Test public void testGetErrorFrameJWindow() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run - headless environment"); return; } assertNotNull(ui.getErrorFrame(new JWindow())); }