@Test public void testStrechButtonToComponent() { System.out.println("strechButtonToComponent"); JComponent component = new JTextField(); JButton button = new JButton(); GuiBuilderHelper.strechItemToComponent(component, button); assertTrue(component.getHeight() == button.getHeight()); }
public static void strechItemToComponent(JComponent component, JComponent item) { int iWidth = (int) item.getPreferredSize().getWidth(); int iHeight = (int) component.getPreferredSize().getHeight(); item.setPreferredSize(new Dimension(iWidth, iHeight)); }
GuiBuilderHelper { public static void strechItemToComponent(JComponent component, JComponent item) { int iWidth = (int) item.getPreferredSize().getWidth(); int iHeight = (int) component.getPreferredSize().getHeight(); item.setPreferredSize(new Dimension(iWidth, iHeight)); } }
GuiBuilderHelper { public static void strechItemToComponent(JComponent component, JComponent item) { int iWidth = (int) item.getPreferredSize().getWidth(); int iHeight = (int) component.getPreferredSize().getHeight(); item.setPreferredSize(new Dimension(iWidth, iHeight)); }  }
GuiBuilderHelper { public static void strechItemToComponent(JComponent component, JComponent item) { int iWidth = (int) item.getPreferredSize().getWidth(); int iHeight = (int) component.getPreferredSize().getHeight(); item.setPreferredSize(new Dimension(iWidth, iHeight)); }  static JScrollPane getTextAreaScrollPaneContainer(JTextArea textArea, int nbLines); static void strechItemToComponent(JComponent component, JComponent item); static JPanel getComponentWithMargin(Component component, int top, int left, int bottom, int right); }
GuiBuilderHelper { public static void strechItemToComponent(JComponent component, JComponent item) { int iWidth = (int) item.getPreferredSize().getWidth(); int iHeight = (int) component.getPreferredSize().getHeight(); item.setPreferredSize(new Dimension(iWidth, iHeight)); }  static JScrollPane getTextAreaScrollPaneContainer(JTextArea textArea, int nbLines); static void strechItemToComponent(JComponent component, JComponent item); static JPanel getComponentWithMargin(Component component, int top, int left, int bottom, int right);  }