2
I have a matrix Tabuleiro[][] tabuleiro = New Tabuleiro[20][20]
.
It contains objects from a class not yet implemented, which will have some values, such as cell color and a position marker.
I would like to know if it is possible to display this matrix graphically, for example the fields of the board, as follows:
That is, that graphically represent this matrix, in a very basic way.
Welcome to the OS in English! Visit the Help Center (http://answall.com/help) to learn more about how to ask questions! As you put it, your question is very broad, and a simple "Yes, it is possible" would answer it but would obviously leave you unsatisfied. Be more specific about your problem and show us what you tried so we can help you better.
– Vinícius Gobbo A. de Oliveira
The point is that I don’t know anything about a graphical interface. And I wanted to know an easy method to represent this table graphically.
– Eduardo
So, Eduardo, as the colleague has already commented your question is very wide. There are several ways to draw something similar. An image, by the way, is still a two-dimensional matrix of pixels. I suggest you edit the question to at least provide more information about what should be "drawn" at each position of your matrix (where is the code of the "Board" class?). Also, if you "know nothing" of graphical interface, it will not be with an issue that your doubts will all be solved. How about starting with something simpler, and posting your doubts here slowly? :)
– Luiz Vieira
You can, for example, try to draw a unit of this class: http://zetcode.com/gfx/java2d/basicdrawing/
– Luiz Vieira