SHARE
TWEET

Untitled

a guest Feb 19th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private Object[] loadName;
  2.    
  3. public Object[] LoadSupplier(){
  4.     b = a.openSession();
  5.     b.beginTransaction();
  6.     Query query = b.createQuery("FROM Supplier");
  7.     @SuppressWarnings("unchecked")
  8.     ArrayList<Supplier> load = (ArrayList<Supplier>) query.list();
  9.     b.getTransaction().commit();
  10.     b.close();
  11.     for(Supplier supply : load){
  12.         loadName = new Object[]{supply.getSupplierName()};
  13.     }
  14.     return loadName;
  15. }
  16.    
  17. comboCategory = new JComboBox(LoadSupplier());
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top