int (final GridBagConstraints gbc) { return switch (gbc.fill) { case GridBagConstraints.HORIZONTAL -> GridConstraints.FILL_HORIZONTAL; case GridBagConstraints.VERTICAL -> GridConstraints.FILL_VERTICAL; case GridBagConstraints.BOTH -> GridConstraints.FILL_BOTH; default -> GridConstraints.FILL_NONE; }; }