Suppose i have a JPanel 5x5 and the layout is GridLayout(). It's possible to switch cell between each other?

There is no specific method for that. Just use add() and remove() to switch their places.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.