I have task to prepare two windows with swing. One contains grid of squares, with random numbers in them. In second I need to load pieces of tiled image and then show them in the correct order, forming tiled image.
Windows should look like this :
Okay so how to bite this ? I've used swing only few times to draw some 2d polylines, so basically I just theoretically now what to do. Ok, so window number 1: I start with creating Jframe for the window. Then I do for loop and in it create 16 JLabels with random numbers in them ? How to set margins between each tile and the whole window ?
Window number 2 : So I start the same, but instead of loading numbers I add images ? Now, how can I load image from file and then set it as background ?