The issue presented is whether the trial court had subject matter jurisdiction to impose sanctions for contempt of court regarding a custodial parent’s refusal to comply with visitation rights established in an earlier order. We conclude that jurisdiction existed and affirm.
J.L.V.’s mother filed two motions with the trial court on December 11, 1986. One was a motion for contempt. The other was a motion for expanded visitation. Both were on the grounds that M.W.G., father of the child, had virtually cut off any communications with the mother and had, despite previous court orders, flatly announced that Christmas visitation would not be allowed. The record reflects that the father then changed his residence without informing the mother. Thé trial court, after service was finally obtained on the father, heard the matter on February 26, 1987, after the Christmas visitation period had expired. Counsel for the father appeared at the hearing and, without prior notice, objected to the court’s jurisdiction.
The father’s contention is that by virtue of the Uniform Child Custody Jurisdiction Act, ch. 822, Stats., and by virtue of his leaving Wisconsin and moving to Texas, the court lost subject matter jurisdiction over the contempt action. The question of whether the court had subject matter jurisdiction is a question of law that we review independently of the trial court. See Dragoo v. Dragoo, 99 Wis. 2d 42, 43, 298 N.W.2d 231, 232 (Ct. App. 1980).
*311The father also argues that even if the court had jurisdiction, it erred by denying his motion requesting the court to decline jurisdiction pursuant to sec. 822.07, Stats., on the grounds that Wisconsin is an inconvenient forum. The question of whether the court should have declined to exercise its jurisdiction is a discretionary determination. Jones v. Jones, 54 Wis. 2d 41, 45-46, 194 N.W.2d 627, 630 (1972). Therefore, the standard of review as to this issue is whether the court abused its discretion. A discretionary determination will be sustained if the trial court examined relevant facts, applied the proper standard of law, and demonstrated a rational process.
It is basic that there are two forms of jurisdiction that must be present before a matter can be heard by the court, subject matter jurisdiction and personal jurisdiction. No issue has been raised contesting personal jurisdiction. There is also no question or dispute that until January 27, 1984, when the father moved from Wisconsin with the child, the trial court had subject matter jurisdiction and that all prior court orders regarding custody and jurisdiction were proper. The issue is thus whether the Act thereafter deprived the trial court of competency to exercise its jurisdiction to entertain the mother’s motion for contempt.
The father argues that the purpose of the Act is to assure that litigation concerning the custody of a child takes place in the state with which the child and family have the closest connection. Relying on Dragoo, 99 Wis. 2d at 45, 298 N.W.2d at 232-33, the father insists that "it is beyond dispute that summer visitation is not a connection significant enough to support jurisdiction in Wisconsin.”
*312The father’s argument is unpersuasive. Unlike Dragoo, the present appeal does not involve a child custody determination or custody modification, where the requirements of sec. 822.03 must be met at the commencement of the proceedings. See Dragoo, 99 Wis. 2d at 43, 298 N.W.2d at 232. The trial court, by its decision of May 28, 1987, granted only the mother’s motion for contempt. The contempt order appealed from here is not "litigation concerning the custody of a child.” See secs. 822.01(l)(c) and 822.02(3), Stats. The trial court order merely enforced its previous order of February 12, 1985, through the contempt procedure provided in ch. 785, Stats. Section 785.03(l)(a), Stats., provides:
A person aggrieved by a contempt of court may seek imposition of a remedial sanction for the contempt by filing a motion for that purpose in the proceeding to which the contempt is related. The court, after notice and hearing, may impose a remedial sanction authorized by this chapter.
Contrary to the father’s position, the courts have inherent power to hold in contempt those who disobey an order of the court. State v. A. W.O., 117 Wis. 2d 120, 126, 344 N.W.2d 200, 203 (Ct. App. 1983). The court order of February 12, 1985, provided that the mother shall have visitation alternating annually between December 15 to December 23 and December 23 to December 30. The father not only denied visitation, but unilaterally cut off any contact whatsoever between the mother and her child. Then, the father moved with the child without informing the mother of their whereabouts. Wisconsin’s policy is to encourage the continuance of the child’s relationship with the noncustodial parent despite physical separation. Long *313v. Long, 127 Wis. 2d 521, 381 N.W.2d 350 (1986). The father’s behavior was openly disobedient of the court’s February 12, 1985, order. Disobedience of a lawful court order constitutes contempt of court. Section 785.01(l)(b), Stats. Upon such a disobedience, a court is authorized under sec. 785.02, Stats., to impose remedial or punitive sanctions as punishment for the contempt. A. W.O., 117 Wis. 2d at 126, 344 N.W.2d at 203.
The father next contends that the trial court abused its discretion by determining that Wisconsin was not an inconvenient forum. The trial court found as follows:
a) Texas is J.L.V.’s home state, but may or may not have a closer connection with the child than Wisconsin. It is also unclear whether substantial evidence concerning J.L.V.’s present or future upbringing is more readily available in Texas than Wisconsin, although such an inference may be reasonable, since J.L.V. has lived in Texas for the past two years.
b) At the same time, however, Wisconsin appears to be no less an appropriate forum to hear the issues particularly relating to the claim of contempt, because:
—This court issued the visitation order allegedly violated by the father.
—The father and J.L.V. moved to Texas with the consent of the mother under sec. 767.245, Stats., and the purpose of this removal statute is "to sustain a relationship between the child and the noncustodial parent by protecting reasonable visitation rights.” Marriage of Long v. Long, 127 Wis. 2d 521, 532 (1986).
—A child's relationship with the noncustodial parent has an important bearing on the child’s best *314interests. Long, supra. Indeed, a violation of a court order under sec. 767.245 may be deemed a change of circumstances allowing the court to modify the custody judgment. Pamperin v. Pamperin, 112 Wis. 2d 70, 76 (Ct. App. 1983).
—Finally, this Court's exercise of jurisdiction does not contravene any of the purposes of ch. 822, Stats.
Again, we conclude that sec. 822.07 applies to initial custody determinations or modification decrees. Because the present case involves a contempt proceeding, sec. 822.07 is inapplicable.
Finally, we note that on December 21, 1982, the mother and father entered into a stipulation resolving the original paternity action. The first term of that stipulation provided: "That the undersigned parties consent to entry of judgment in accordance with the terms of this agreement. It is understood and agreed that the court shall have continuing jurisdiction of this matter.” The terms of this stipulation were incorporated into the January 7,1983, judgment. The father’s argument concerning inconvenient forum comes years after benefiting from previous orders allowing him to move to Texas with the child after stipulating to continued jurisdiction in Wisconsin. While subject matter jurisdiction cannot be conferred by the parties’ consent, sec. 801.04(1), Stats., we consider his present argument concerning inconvenient forum critically undercut by his own prior course of actions.
By the Court. — Orders affirmed.