JXHyperlink extends JButton { public void setURI(URI uri) { setAction(HyperlinkAction.createHyperlinkAction(uri)); } JXHyperlink();  JXHyperlink(Action action); void setURI(URI uri); Color getUnclickedColor(); void setClickedColor(Color color); Color getClickedColor(); void setUnclickedColor(Color color); void setClicked(boolean clicked); boolean isClicked(); void setOverrulesActionOnClick(boolean overrule); boolean getOverrulesActionOnClick(); @Override String getUIClassID(); @Override void updateUI(); static final String uiClassID; }
@Test public void testSetURI() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run ui test - headless environment"); return; } JXHyperlink hyperlink = new JXHyperlink(); hyperlink.setURI(null); assertNotNull(hyperlink.getAction()); assertTrue(hyperlink.getAction() instanceof HyperlinkAction); }