diff --git a/src/components/org/apache/jmeter/assertions/gui/XPathAssertionGui.java b/src/components/org/apache/jmeter/assertions/gui/XPathAssertionGui.java index f3732b1..59d56eb 100644 --- a/src/components/org/apache/jmeter/assertions/gui/XPathAssertionGui.java +++ b/src/components/org/apache/jmeter/assertions/gui/XPathAssertionGui.java @@ -27,7 +27,6 @@ import javax.swing.JPanel; import org.apache.jmeter.assertions.XPathAssertion; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.util.JMeterUtils; -import org.apache.jorphan.gui.layout.VerticalLayout; public class XPathAssertionGui extends AbstractAssertionGui { @@ -76,14 +75,22 @@ public class XPathAssertionGui extends AbstractAssertionGui { } private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final) - setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP)); + setLayout(new BorderLayout()); setBorder(makeBorder()); - add(makeTitlePanel()); - Box box = Box.createVerticalBox(); - box.add(createScopePanel(true)); - add(box); - + Box topBox = Box.createVerticalBox(); + + topBox.add(makeTitlePanel()); + + topBox.add(createScopePanel(true)); + + xml = new XMLConfPanel(); + xml.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils + .getResString("xpath_assertion_option"))); //$NON-NLS-1$ + topBox.add(xml); + + add(topBox, BorderLayout.NORTH); + // USER_INPUT JPanel sizePanel = new JPanel(new BorderLayout()); sizePanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10)); @@ -91,13 +98,7 @@ public class XPathAssertionGui extends AbstractAssertionGui { getXPathAttributesTitle())); xpath = new XPathPanel(); sizePanel.add(xpath); - - xml = new XMLConfPanel(); - xml.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils - .getResString("xpath_assertion_option"))); //$NON-NLS-1$ - add(xml); - - add(sizePanel); + add(sizePanel, BorderLayout.CENTER); } /** diff --git a/src/components/org/apache/jmeter/assertions/gui/XPathPanel.java b/src/components/org/apache/jmeter/assertions/gui/XPathPanel.java index 04eae16..497254f 100644 --- a/src/components/org/apache/jmeter/assertions/gui/XPathPanel.java +++ b/src/components/org/apache/jmeter/assertions/gui/XPathPanel.java @@ -20,6 +20,7 @@ package org.apache.jmeter.assertions.gui; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.BorderLayout; import javax.swing.Box; import javax.swing.JButton; @@ -62,18 +63,18 @@ public class XPathPanel extends JPanel { } private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final) + setLayout(new BorderLayout()); + Box hbox = Box.createHorizontalBox(); + hbox.add(Box.createHorizontalGlue()); - hbox.add(JTextScrollPane.getInstance(getXPathField())); + hbox.add(getNegatedCheckBox()); hbox.add(Box.createHorizontalGlue()); hbox.add(getCheckXPathButton()); + hbox.add(Box.createHorizontalGlue()); - Box vbox = Box.createVerticalBox(); - vbox.add(hbox); - vbox.add(Box.createVerticalGlue()); - vbox.add(getNegatedCheckBox()); - - add(vbox); + add(JTextScrollPane.getInstance(getXPathField()), BorderLayout.CENTER); + add(hbox, BorderLayout.SOUTH); setDefaultValues(); }