public Vector getMakanan () throws ClassNotFoundException, SQLException {
        Vector makanan = new Vector();
        
        String dbDriver = "com.mysql.jdbc.Driver";
        String dbUrl = "jdbc:mysql://localhost/kasir";
        String dbUser = "root";
        String dbPass = "";
        String login = "";
        
        // 1. Aktivasi driver database
        Class.forName(dbDriver);

        // 2. Connect ke database
        Connection conn = DriverManager.getConnection(dbUrl, dbUser, dbPass);
        
        String sql2 = "select * from makanan;";
        PreparedStatement ps2 = conn.prepareStatement(sql2);
        ResultSet rs = ps2.executeQuery();
        
        //List<Mahasiswa> mahasiswas = new ArrayList<Mahasiswa>();
       
        while(rs.next()){
        //Retrieve by column name
            Vector data = new Vector();
            data.add(rs.getInt("id"));
            data.add(rs.getString("makan"));
            data.add(rs.getInt("harga"));
            
            makanan.add(data);
        }
        
        rs.close();
        conn.close();       
        return makanan;
    }