greetngs, i am trying to learn Java and Swing by writing a simple game of connect4.
i am hoping you could guide me regarding the following issue:
to emulate the connect4 grid should i use a JTable or rely on Grid layout?
thank you.
greetngs, i am trying to learn Java and Swing by writing a simple game of connect4.
i am hoping you could guide me regarding the following issue:
to emulate the connect4 grid should i use a JTable or rely on Grid layout?
thank you.
I think Grid layout would be better
An example of grid layout: http://leepoint.net/notes-java/GUI/layouts/30gridlayout.html
You can use a JLabel to add the images. You can create an array of JLabels and add each one to one cell of the panel. If you need to modify the picture you just modify the Jlabel picture.