Layer the cheese, ham, tomato, pickles and caramelized onions on four bread slices; top with remaining bread. Spread outsides of sandwiches with butter.
Cook on a panini maker or indoor grill for 3-4 minutes or until bread is browned and cheese is melted.