Draw your graph:

q = graph.getNeighbours(start).sortAscending()
mst = [start]
while(!q.empty())
  next = q.popFirst()
  if(notVisited(next.vertex))
    visit(next.vertex)
    q.add(graph.getNeighbours(next.vertex))
    q.sortAscending()
    mst.append(next.vertex)
SHORT EXPLANATION
---------------------
1. Mark all vertices as unvisited.
2. Visit the first vertex.
3. Find all edges of the vertex and add them to a queue (cost ascending).
4. Dequeue the first element.
- If the destination vertex has been visited, ignore the edge.
- If it's not been visited, visit it and repeat steps 3 - 4.
5. The visited vertices and edges form the minimum spanning tree of the graph.

To draw a new vertex, simply click anywhere on the canvas above.
To create an edge between two vertices, click on the first vertex and then on the second one.
You can create a random graph by clicking on the 'Random' button above the canvas.
To clear the canvas, use the 'Clear' button.
Speed:
Slow   Fast
Start: