The clear Arthur parallel is Aragorn. He is the rightful king of a realm (Gondor or England), his true identity hidden. Upon his ascension, a new, glorious age is ushered in. He has a capital, a beautiful city. He has a beautiful queen beloved by the realm. Arthurian legend, whether the central figure of the particular tale is Arthur or one of his knights, is a romantic hero's journey. It is the story of the Man who became King, who drove back the enemy, and marries the girl (partially as compensation for his victory--Elrond insists upon Aragorn taking the throne of Gondor before marrying Arwen, which necessitates battling Sauron, and Leodegrance "giving" Guinevere to Arthur after Arthur fights with Leodegrance against King Rion, or Reince depending on the version of the legend).
This makes the Sword in the Stone far closer to Anduril, not Sting. Beyond their possession by the king, it is the sword, in both cases, that demonstrates that the King is king. In Arthurian legend, it is indicated Malory's famed line: "Whoso pulleth out this Sword of this Stone and Anvil, is Rightwise King Born of All England". For Anduril, it is the sword that proves in the Paths of the Dead to the Oathbreakers that Aragorn is the heir of Isildur. The sword itself identifies the King, and the King would not be complete without his sword.
Sting, on the contrary, does not identify a king. Frodo is a simple person cast into extraordinary circumstances--the Everyman hero archetype. His story is not that of the sword, the kingdom, and the fair lady. Sting does not identify a king, nor is it wielded by a king. That key element, even if it is drawn from a beam, makes it less of a valid candidate for the Sword in the Stone parallel.
Anduril, however, has a sword parallel for itself, one that I think is more of a parallel than Sting's beam. Aragorn summons the Oathbreakers at the Stone of Erech using Anduril as proof of his lineage. He unfurls a banner, but it is Anduril that allows for him to have safe passage through the Paths of the Dead and which marks him as the King and Heir of Isildur (Tolkien, Return of the King, Chapter Two: "The Passing of the Grey Company"). Importantly, this act takes place at a large stone. The symbolism is clear. It is in this moment that Aragorn truly takes up the mantle of King and Heir of Gondor, when he comes into his own as King in deed rather than Heir in name and blood. Watching the scene in Jackson's adaptation, too, is dramatic, watching Aragorn become truly regal and commanding. Aragorn becomes King at the stone as much as he does at his grand coronation; similarly, Arthur becomes the King of England as much at his stone, with his sword, as he does when being crowned later.
Sting can then be considered a reference to another mythic hero's sword: Gram, the sword of Sigurd. While Gram has a direct parallel to Anduril, as it is shattered by Odin in battle with Sigurd's father and then reforged, Gram is originally thrust into the trunk of a Barnstokkr tree by Odin. Whoever draws it (Sigmund, Sigurd's father, ultimately), gets to keep it. There is no royal lineage associated with it; it is merely the finest sword to be held by mortal hand. Sigurd ultimately faces the dragon Fafnir with Gram reforged, and Bilbo faces the dragon Smaug armed with Sting (though he doesn't kill Smaug with it). The key part of the parallel, however, is that both swords are passed down to their son (or adopted son, in the case of Bilbo and Frodo). Unlike Anduril, which is stored for generations before being reforged, Sting is passed directly from Bilbo to Frodo, just as the (shards of, admittedly) Gram are given to Sigurd by his father.
None of these parallels are perfect, and the best answer is that Anduril and Sting are drawn from a blending of Gram and Arthur's Sword in the Stone. Both Anduril and Sting are influenced by both the Sword in the Stone and Gram, and each has elements not related to either. Each is a creation of Tolkien's, not a direct echo to a mythical sword. Yet Tolkien knew the myths of Arthur and Sigurd, and both of them would have influenced his creation of his own magic swords. Simply claiming that Sting is a parallel to the Sword in the Stone because of Bilbo thrusting it into a beam neglects a large part of it and more blatantly ignores the other Sword in the Stone reference. Frodo does not need a Sword in the Stone, because he is not a kingly hero. However, in the interest of making blanket statements for the sake of discussion, I believe that Anduril is closer in its function to that of the Sword in the Stone, and Gram is closer to Sting.