On diatonic barred instruments you usually find the notes of the C-major scale:
c, d, e, f, g, a, b
If you now exchange the f-bar for the f#-bar (c, d, e, f#, g, a, b) you get a G-major scale:
g, a, b, c, d, e, f#
If you exchange the b-bar for the bb-bar (c, d, e, f, g, a, bb) you get a F-major scale:
f, g, a, bb, c, d, e