Tic Tac Toe in Swing
Change your fields' visibility to private as others object shouldn't know (nor care) about the inner working of your TicTacToe, this is known as Encapsulation
Turn the buttons into a 2D array and make the name clearer (b isn't really informative ^^)
Avoid magic numbers (talking about 3, 9, 500 which can be replaced by GRID_LENGTH, GRID_SIZE...) : this way, not only it's clearer for a newcomer but if you ever change one value it'll be updated everywhere
I don't think there is any point in making win a field, it's only used like a local variable
Turn the // WHO WON part into a method that'll do all the checks for you and return you a boolean : in general, calling multiple short methods makes for a clearer code as the code is more declarative this way (and it removes useless comments)
For same reasons as above, turn the victory message printing into its own method
Use a for loop to check every lines and every columns without caring for their size, that'll make for a clearer code and it'll also be easier to modify the current behaviour (if you ever want to allow for differents grid size)
You may want to not compute diagonals unless someone has checked one of the diagonal value, it'll probably slighty increase cyclomatic complexity though so it's up to you ;)
You forgot to disable the buttons if the game ends in a tie... in the same way as points 5 and 6, creating a disableTicTacToe or disableFrame method may be neat
Maybe you should consider offering the players a new game when one has ended