Code example for JLabel

Methods: getLabelForgetText

0
        } 
        if (SwingConstants.CENTER != button.getVerticalAlignment()) {
            throw new Error("unexpected vertical alignment");
        } 
        JLabel label = (JLabel) panel.getComponents()[1];
        if (!label.getText().equals("label")) { // NON-NLS: hardcoded in XML
            throw new Error("unexpected label text");
        } 
        if (button != label.getLabelFor()) {
            throw new Error("unexpected component");
        } 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java