R. Shah
R. Shah

Reputation: 1

How do I put a jLabel on top of another using Netbeans?

As the title states, how would I approach putting a jLabel (which in this case is an image) on top of another jLabel (which is also an image)?

The use case is a checkers game. Every time I try to drag another jLabel on, it moves the existing one to the side.

Link to GitHub

Picture of board so far

Upvotes: 0

Views: 75

Answers (1)

Ben
Ben

Reputation: 1142

You probably want to look into layered panes - https://docs.oracle.com/javase/tutorial/uiswing/components/layeredpane.html

Upvotes: 1

Related Questions