JLabel images array
For comparison, I’ve re-factored @HFOE’s example so that Ground implements Icon and indexes the array returned by values(). As value is an implementation detail, int[][] MAP could instead be Ground[][] MAP. Update: This variation illustrates Ground[][] MAP and adds TexturePaint. import java.awt.Color; import java.awt.Component; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.GridLayout; import java.awt.TexturePaint; import java.awt.geom.Rectangle2D; import … Read more