Issue Details (XML | Word | Printable)

Key: FEST-46
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Alex Ruiz
Reporter: Alex Ruiz
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
FEST

Frame creation for component testing (issue 296)

Created: 05/Mar/09 01:47 PM   Updated: 28/Apr/09 09:22 AM   Resolved: 28/Apr/09 09:22 AM
Return to search
Component/s: Swing
Affects Version/s: FEST-Swing 1.1
Fix Version/s: FEST-Swing 1.2a1

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive mylyn-context.zip (29 kB)



 Description  « Hide

From Hayden Shorter:

Thanks for the great project

To test my JPanel in isolation I need to put them in a frame to make them "showing" with the following code:

/**
     * Creates a frame to show the provided panel.
     *
     * @param panel
     * @param robot
     * @throws java.awt.HeadlessException
     */
    private void showPanel(final JPanel panel, Robot robot) throws
HeadlessException {
        Frame app = new Frame();
        app.setSize(panel.getSize());
        app.add(panel);
        FrameFixture frame = new FrameFixture(robot, app);
        frame.show();
    }

It's not appropriate for me to start the whole frame as there are a number of panels and dependencies. It would be good if the FEST-Swing API allowed something like the above. I'm sure there are a number of components this applies to, not just JPanels.


Original report: Issue 296 (Google Code)



There are no comments yet on this issue.