I coded for selecting Items from Drug List window and getting that input to Edit Inventory Window.
But the problem is that by Clicking "select" button of the Drug List window opens another window of Edit Inventory.Not include selected data to the current Edit Inventory Window.
My code for Select button the Drug List;
private void selectBtnActionPerformed(java.awt.event.ActionEvent evt) {
String id = itemIDlbl.getText();
String name = itemNamelbl.getText();
try {
InventoryManagementedit edit = new InventoryManagementedit();
edit.get(id,name);
this.dispose();
edit.setVisible(true);
} catch (SQLException ex) {
Logger.getLogger(InventoryManagementeditList.class.getName()).log(Level.SEVERE, null, ex);
}
}
get() method for Edit Inventory for receive selected Items;
//getting input from the drug list window
public void get(String id, String name){
IDcombo.setSelectedItem(id);
Namecombo.setSelectedItem(name);
}
How to get the selected data to the current Edit Inventory not to a new window of Edit Inventory.