private void setLinieComboBox() {
    Vector<String> linie = null;
    if (dbConnection != null) {
      linie = dbConnection.getBuses();
    }
    linieComboBox = new JComboBox(linie);
    TitledBorder tr = BorderFactory.createTitledBorder("Linia");
    linieComboBox.setBorder(tr);
    linieComboBox.addActionListener(
        new ActionListener() {

          public void actionPerformed(ActionEvent e) {
            String liniaString = (String) linieComboBox.getSelectedItem();
            setLinia(liniaString);
            frame.setTitle("Szczegóły linii " + liniaString);
            updateKierunekComboBox();
            updatePrzystankiScrollPane();
            updateRozkladScrollPane();
          }
        });
  }
 public void setLinia(String id) {
   linia = dbConnection.getLinia(id);
 }
 public void setLinia(int id) {
   linia = dbConnection.getLinia(id);
 }