Rabbi Yehudah the Prince did three unusual things: he planted a tree on Purim, bathed on the fast of the Seventeenth of Tammuz, and sought to abolish the fast of Tisha b'Av, but the Sages did not agree to this. Each of his actions is analyzed by the Talmud. For example, how could he do work on Purim? Actually, there is nothing wrong with it, but if the community has the custom to abstain from work on this day (as many communities do nowadays), one should follow. About the tree - Rabbi Yehudah planted a particular tree for a joyous occasion, which is permitted.
Art: A French Harbour Town by Adrien Gabriel Voisard-Margerie