A man on trial for bankruptcy shot dead a judge, a lawyer and a co-defendant in the Palace of Justice in central Milan.