public final class Containers extends Object
Containers.| Modifier and Type | Field and Description |
|---|---|
static String |
CREATED_FRAME_NAME
Name of the
JFrames created by this class. |
| Modifier and Type | Method and Description |
|---|---|
static FrameFixture |
frameFixtureFor(Container contentPane)
Creates a new
JFrame and uses the given Container as its content pane. |
static JFrame |
frameFor(Container contentPane)
Creates a new
JFrame and uses the given Container as its content pane. |
static FrameFixture |
showInFrame(Container contentPane)
Creates a new
JFrame and uses the given Container as its content pane. |
public static final String CREATED_FRAME_NAME
JFrames created by this class.@RunsInEDT @Nonnull public static FrameFixture showInFrame(@Nonnull Container contentPane)
JFrame and uses the given Container as its content pane. The created JFrame
is wrapped and displayed by a FrameFixture.
Note:This method creates a new Robot. When using this method, please do not create any
additional instances of Robot. Only one instance of Robot can exist per test class.
contentPane - the Container to use as content pane for the JFrame to create.FrameFixture.frameFor(Container)@RunsInEDT @Nonnull public static FrameFixture frameFixtureFor(@Nonnull Container contentPane)
JFrame and uses the given Container as its content pane. The created JFrame
is wrapped by a FrameFixture. Unlike showInFrame(Container), this method does not
display the created JFrame.
Note:This method creates a new Robot. When using this method, please do not create any
additional instances of Robot. Only one instance of Robot can exist per test class.
contentPane - the Container to use as content pane for the JFrame to create.FrameFixture.frameFor(Container)@RunsInEDT @Nonnull public static JFrame frameFor(@Nonnull Container contentPane)
JFrame and uses the given Container as its content pane. The created JFrame
has the name specified by CREATED_FRAME_NAME. This method is executed in the Event Dispatch Thread (EDT.)contentPane - the Container to use as content pane for the JFrame to create.JFrame.Copyright © 2014 AssertJ. All rights reserved.