Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static ArrayList<String> totaleProductenLijst = new ArrayList<String>();
- System.out.println("===ArrayList===");
- System.out.println(totaleProductenLijst);
- //Create object
- Object[] obj=totaleProductenLijst.toArray();
- //convert object to string array
- String[] st=Arrays.copyOf(obj, obj.length, String[].class);
- System.out.println("Convert Array to Sring Array");
- //loop sysout
- System.out.println("====Menu====");
- for (int i = 0; i < st.length; i++) {
- System.out.println(st[i]);
- }
- Bon popup = new Bon(st);
- popup.setVisible(true);
- public Bon(String[] st ) {
- initComponents();
- for (int i = 0; i < st.length; i++) {
- //listTotaalProducten.setListData(st[i]); (Gives Error)
- System.out.println(st[i]);
- }
- }
- ===ArrayList===
- [Hamburger, Hamburger, pizza]
- Convert Array to Sring Array
- ====Menu====
- Hamburger
- Hamburger
- pizza
- ====Bon====
- Hamburger
- Hamburger
- pizza
Add Comment
Please, Sign In to add comment