By Brendan O'Brien

MILWAUKEE (Reuters) - A federal judge has thrown out a U.S. Senator's legal challenge to a part of President Barack Obama's healthcare law that grants health insurance subsidies for members of Congress and their staffs.

U.S. Senator Ron Johnson of Wisconsin had challenged the right of the federal government to continue making employer contributions to Congressional health insurance plans even when lawmakers and their staff purchase coverage through new Obamacare online exchanges.

U.S. District Judge William Griesbach, in Green Bay, dismissed the lawsuit on Monday, saying Johnson had failed to show he had been harmed by the regulation.

"There is nothing in the Constitution stipulating that all wrongs must have remedies, much less that the remedy must lie in federal court," Griesbach, who was appointed by former President George W. Bush, said in his decision.

The 2010 Affordable Care Act, commonly known as Obamacare, has been the subject of years of political and legal attacks by Republicans, including unsuccessful bids to repeal it.

Monday's ruling comes less than four months before elections in which Republicans seek to expand their House majority and win control of the Senate from Obama's fellow Democrats.

After the ruling, Johnson said he still believed the Obama administration was exceeding its legal authority.

"(It) violated its own signature healthcare law by giving special treatment to members of Congress and their staffs," he said in a statement.

"I believe that this executive action by the Obama administration is unlawful and unfair, and that it is only one of many examples of this president's abuse of his constitutional duty."

The U.S. Supreme Court, in a 2012 ruling, upheld the law's "individual mandate", a core provision requiring most Americans obtain health insurance by 2014 or pay a penalty.

The law also created new online marketplaces where Americans can shop for and buy insurance, with the goal of expanding coverage for uninsured and underinsured people.