// i18n[rowDataInputFrame.propName=Input New Row Data]
super(parent, s_stringMgr.getString("rowDataInputFrame.propName"), false);
// get the ConentPane into a variable for convenience
Container pane = getContentPane();
// save data passed in to us
_caller = caller;
// set layout
pane.setLayout(new BorderLayout());
// create the JTable for input and put in the top of window
table = new RowDataJTable(colDefs, initialValues);
// tell scrollpane to use table size with the height adjusted to leave
// room for the scrollbar at the bottom if needed
Dimension tableDim = table.getPreferredSize();
tableDim.setSize(tableDim.getWidth(), tableDim.getHeight() + 15);
table.setPreferredScrollableViewportSize(tableDim);
JScrollPane scrollPane = new JScrollPane(table);
// add row headers to help user understand what the second row is
JPanel rowHeaderPanel = new JPanel();
rowHeaderPanel.setLayout(new BorderLayout());
// i18n[rowDataInputFrame.data=Data]
JTextArea r1 = new JTextArea(s_stringMgr.getString("rowDataInputFrame.data"), 1, 10);
r1.setBackground(Color.lightGray);
r1.setBorder(BorderFactory.createLineBorder(Color.black));
r1.setEditable(false);
rowHeaderPanel.add(r1, BorderLayout.NORTH);
// i18n[rowDataInputFrame.colDescription=\nColumn\nDescription\n]
JTextArea r2 = new JTextArea(s_stringMgr.getString("rowDataInputFrame.colDescription"), 4, 10);
r2.setBackground(Color.lightGray);
r2.setBorder(BorderFactory.createLineBorder(Color.black));
r2.setEditable(false);
rowHeaderPanel.add(r2, BorderLayout.CENTER);
scrollPane.setRowHeaderView(rowHeaderPanel);
pane.add(scrollPane, BorderLayout.NORTH);
// create the buttons for input done and cancel
JPanel buttonPanel = new JPanel();
// i18n[rowDataInputFrame.insert=Insert]
JButton insertButton = new JButton(s_stringMgr.getString("rowDataInputFrame.insert"));
buttonPanel.add(insertButton);
insertButton.setActionCommand("insert");
insertButton.addActionListener(this);
// i18n[rowDataInputFrame.cancel=Cancel]
JButton cancelButton = new JButton(s_stringMgr.getString("rowDataInputFrame.cancel"));
buttonPanel.add(cancelButton);
cancelButton.setActionCommand("cancel");
cancelButton.addActionListener(this);
pane.add(buttonPanel, BorderLayout.SOUTH);
// this frame should really go away when done
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
// display the frame