acceptButton.setAlignmentX(RIGHT_ALIGNMENT);
partnerColumn.add(acceptButton);
slotRow.add(partnerColumn);
slotRow.add(new JSeparator(SwingConstants.VERTICAL),
SBoxLayout.constraint(SLayout.EXPAND_Y));
/*
* Create user offer's side
*/
JComponent myColumn = SBoxLayout.createContainer(SBoxLayout.VERTICAL, SBoxLayout.COMMON_PADDING);
JLabel myOfferLabel = new JLabel("My offer");
myOfferLabel.setAlignmentX(CENTER_ALIGNMENT);
myColumn.add(myOfferLabel);
mySlots = new SlotGrid(2, 2);
myColumn.add(mySlots);
slotRow.add(myColumn);
myOfferStatus = new JLabel("Changing");
myOfferStatus.setAlignmentX(CENTER_ALIGNMENT);
myColumn.add(myOfferStatus);
offerButton = new JButton("Offer");
offerButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
controller.lockTrade();
}
});
offerButton.setAlignmentX(RIGHT_ALIGNMENT);
myColumn.add(offerButton);
/*
* Separate the cancel button from the rest of the components to
* highlight its special status.
*/
content.add(new JSeparator(SwingConstants.HORIZONTAL),
SBoxLayout.constraint(SLayout.EXPAND_X));
// Cancel button
cancelButton = new JButton("Cancel");
cancelButton.addActionListener(new ActionListener() {