AssertJ has options for finding JPanel, JFrame, and suite of other standard Swing components, but I am wanting to test a custom Prefuse Display window derived directly from the JComponent class. What method on the main FrameFixture object should I use and what parameters should I use?
My best guess was:
window.panel(new GenericTypeMatcher<JComponent>(RadialDisplayWork.class) {
@Override
protected boolean isMatching(JComponent panel) {
return "RadialDisplayWork".equals(panel.getClass().getSimpleName());
}
});
it isn't found and throws an exception as it should as WorkWindow is not a panel.