He was successively member of the Bayerischer Federal (BBB), Bayerischer Bauern-und Mittelstandsbund (BBM) (from 1922), the Nationalsozialistische Deutsche Arbeiterpartei(NSDAP) (from 1933) and the Bayernpartei (after the war).
Johan Wartner resided in a number of regional parliaments and councils in the State of Bavaria and became mayor of the municipality in 1925 Mitterfels. From 1920 to 1933 he was Council member of the Bavarian Landtag.
After the Second World War he joined the Bayernpartei and was elected to the German Bundestag, during the first Government term from 1949 to 1953. He voted against the party appointments in in 1949, at the Chancellor Konrad Adenauer, for election. Without those opposition voice there was no majority for Adenauer. With that decision took out Johann Wartner general awareness in Germany. A secret that he announced only shortly before his death.