Add chopped onion, fresh okra, and garlic to skillet over medium, and cook, stirring often, until onion is just tender, about 6 minutes. Stir in fresh corn kernels, salt, pepper, and drained beans, and cook, stirring often, until corn is tender and bright yellow, 5 to 6 minutes. Add butter, and cook, stirring constantly, until butter is melted, about 1 minute. Remove from heat.