-1

Iam making a level editor for libgdx.but I want to use the java swing buttons. how can I put the libgdx display inside a JFrame

Daahrien
  • 10,190
  • 6
  • 39
  • 71

1 Answers1

0

LibGDX really isn't meant to work with swing components, but LibGDX does provide its own button classes like ImageButton or TextButton that you can use for the same purpose. It does take a little bit more work to set them up because you need to provide the background image and font that the button uses.

See the accepted answer here for how to setup text buttons:

How to create a button in Libgdx?

Community
  • 1
  • 1
Tekkerue
  • 1,497
  • 1
  • 11
  • 17