Code example for JList

Methods: getModel

0
        StateVertex element = new FinalStateImpl();
        element.addIncomingTransition(transition);
        instance.configurePanel(element);
 
        JScrollPane scrollPane = (JScrollPane) instance.retrievePanel().getComponent(0);
        assertEquals("Failed to refresh panel.", 1, ((JList) scrollPane.getViewport().getView()).getModel().getSize());
    } 
 
    /** 
     * <p> 
     * Tests IncomingTransitionPropertyPanel#execute() for accuracy. 
     * </p> 
     */ 
    public void testExecute() { 
        Transition transition = new TransitionImpl();
        StateVertex element = new FinalStateImpl();
        element.addIncomingTransition(transition);
        instance.configurePanel(element);
        JScrollPane scrollPane = (JScrollPane) instance.retrievePanel().getComponent(0);
        ((JList) scrollPane.getViewport().getView()).setSelectedIndex(0);
Contextual code suggestions in your IDE  Get Codota for Java