private void setUpDatabase() {
removeAll();
JPanel db = new JPanel();
GridBagLayout gbLayout = new GridBagLayout();
//db.setLayout(new GridLayout(6, 1));
db.setLayout(gbLayout);
JLabel urlLab = new JLabel("Database URL", SwingConstants.RIGHT);
urlLab.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
GridBagConstraints gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.EAST;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = 0; gbConstraints.gridx = 0;
gbLayout.setConstraints(urlLab, gbConstraints);
db.add(urlLab);
m_dbaseURLText = new EnvironmentField();
m_dbaseURLText.setEnvironment(m_env);
/* int width = m_dbaseURLText.getPreferredSize().width;
int height = m_dbaseURLText.getPreferredSize().height;
m_dbaseURLText.setMinimumSize(new Dimension(width * 2, height));
m_dbaseURLText.setPreferredSize(new Dimension(width * 2, height)); */
m_dbaseURLText.setText(((DatabaseConverter)m_dsLoader.getLoader()).getUrl());
gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.EAST;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = 0; gbConstraints.gridx = 1;
gbConstraints.weightx = 5;
gbLayout.setConstraints(m_dbaseURLText, gbConstraints);
db.add(m_dbaseURLText);
JLabel userLab = new JLabel("Username", SwingConstants.RIGHT);
userLab.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.EAST;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = 1; gbConstraints.gridx = 0;
gbLayout.setConstraints(userLab, gbConstraints);
db.add(userLab);
m_userNameText = new EnvironmentField();
m_userNameText.setEnvironment(m_env);
/* m_userNameText.setMinimumSize(new Dimension(width * 2, height));
m_userNameText.setPreferredSize(new Dimension(width * 2, height)); */
m_userNameText.setText(((DatabaseConverter)m_dsLoader.getLoader()).getUser());
gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.EAST;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = 1; gbConstraints.gridx = 1;
gbLayout.setConstraints(m_userNameText, gbConstraints);
db.add(m_userNameText);
JLabel passwordLab = new JLabel("Password ", SwingConstants.RIGHT);
passwordLab.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.EAST;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = 2; gbConstraints.gridx = 0;
gbLayout.setConstraints(passwordLab, gbConstraints);
db.add(passwordLab);
m_passwordText = new JPasswordField();
JPanel passwordHolder = new JPanel();
passwordHolder.setLayout(new BorderLayout());
passwordHolder.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
// passwordHolder.add(passwordLab, BorderLayout.WEST);
passwordHolder.add(m_passwordText, BorderLayout.CENTER);
/* passwordHolder.setMinimumSize(new Dimension(width * 2, height));
passwordHolder.setPreferredSize(new Dimension(width * 2, height)); */
gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.EAST;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = 2; gbConstraints.gridx = 1;
gbLayout.setConstraints(passwordHolder, gbConstraints);
db.add(passwordHolder);
JLabel queryLab = new JLabel("Query", SwingConstants.RIGHT);
queryLab.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.EAST;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = 3; gbConstraints.gridx = 0;
gbLayout.setConstraints(queryLab, gbConstraints);
db.add(queryLab);
m_queryText = new EnvironmentField();
m_queryText.setEnvironment(m_env);
/* m_queryText.setMinimumSize(new Dimension(width * 2, height));
m_queryText.setPreferredSize(new Dimension(width * 2, height)); */
m_queryText.setText(((DatabaseLoader)m_dsLoader.getLoader()).getQuery());
gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.EAST;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = 3; gbConstraints.gridx = 1;
gbLayout.setConstraints(m_queryText, gbConstraints);
db.add(m_queryText);
JLabel keyLab = new JLabel("Key columns", SwingConstants.RIGHT);
keyLab.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.EAST;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = 4; gbConstraints.gridx = 0;
gbLayout.setConstraints(keyLab, gbConstraints);
db.add(keyLab);
m_keyText = new EnvironmentField();
m_keyText.setEnvironment(m_env);
/*m_keyText.setMinimumSize(new Dimension(width * 2, height));
m_keyText.setPreferredSize(new Dimension(width * 2, height)); */
m_keyText.setText(((DatabaseLoader)m_dsLoader.getLoader()).getKeys());
gbConstraints = new GridBagConstraints();
gbConstraints.anchor = GridBagConstraints.EAST;
gbConstraints.fill = GridBagConstraints.HORIZONTAL;
gbConstraints.gridy = 4; gbConstraints.gridx = 1;
gbLayout.setConstraints(m_keyText, gbConstraints);
db.add(m_keyText);
JPanel buttonsP = new JPanel();
buttonsP.setLayout(new FlowLayout());
JButton ok,cancel;