void (final GridConstraints constraints, final GridBagConstraints result) { result.gridx = constraints.getColumn(); result.gridy = constraints.getRow(); result.gridwidth = constraints.getColSpan(); result.gridheight = constraints.getRowSpan(); switch(constraints.getFill()) { case GridConstraints.FILL_HORIZONTAL: result.fill = GridBagConstraints.HORIZONTAL; break; case GridConstraints.FILL_VERTICAL: result.fill = GridBagConstraints.VERTICAL; break; case GridConstraints.FILL_BOTH: result.fill = GridBagConstraints.BOTH; break; default: result.fill = GridBagConstraints.NONE; break; } switch(constraints.getAnchor()) { case GridConstraints.ANCHOR_NORTHWEST: result.anchor = GridBagConstraints.NORTHWEST; break; case GridConstraints.ANCHOR_NORTH: result.anchor = GridBagConstraints.NORTH; break; case GridConstraints.ANCHOR_NORTHEAST: result.anchor = GridBagConstraints.NORTHEAST; break; case GridConstraints.ANCHOR_EAST: result.anchor = GridBagConstraints.EAST; break; case GridConstraints.ANCHOR_SOUTHEAST: result.anchor = GridBagConstraints.SOUTHEAST; break; case GridConstraints.ANCHOR_SOUTH: result.anchor = GridBagConstraints.SOUTH; break; case GridConstraints.ANCHOR_SOUTHWEST: result.anchor = GridBagConstraints.SOUTHWEST; break; case GridConstraints.ANCHOR_WEST: result.anchor = GridBagConstraints.WEST; break; } }