super(BuddyList.getInstance().getContainerFrame(), "Add/Modify Buddy", false);
setTitle(resources.getString("addBuddyDialogTitle"));
this.initComponents();
container.setBorder(BorderFactory.createEmptyBorder(5, 25, 5, 25));
container.setLayout(new BoxLayout(container, BoxLayout.Y_AXIS));
JLabel newBuddyLabel = new JLabel(resources.getString("addBuddyDialogTitle"));
newBuddyLabel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
newBuddyLabel.setAlignmentX(Container.CENTER_ALIGNMENT);
container.add(newBuddyLabel);
JPanel newBuddyPanel = new JPanel();
newBuddyPanel.setLayout(grid);
createInputBox(newBuddyPanel, grid, resources.getString("buddyId")
+ ":", buddyIDBox);
createInputBox(newBuddyPanel, grid, resources.getString("alias") + ":",
buddyAliasBox);
createInputBox(newBuddyPanel, grid, resources.getString("buddyGroup")
+ ":", buddyGroups);
createInputBox(newBuddyPanel, grid, resources.getString("newGroup")
+ ":", newGroupBox);
container.add(newBuddyPanel);
//add the buttons
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
buttonPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
buttonPanel.add(okButton);
buttonPanel.add(cancelButton);
container.add(buttonPanel);