• Post Reply Bookmark Topic Watch Topic
  • New Topic

two dimensional array draw, in "GUI" (help)  RSS feed

 
Oleg Glizerin
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am using the "SWT".

How do i draw a two dimensional array, 4x4, that shows me numbers in it, using "gui" of course.
To be more accurate, i want something like that http://git.io/2048 .
Any help will be appreciated.
Thanks
 
Rob Spoor
Sheriff
Posts: 21095
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The base would be a panel with a GridLayout. Each element could be a JLabel with the numbers on them.
 
Oleg Glizerin
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to draw this using swt and not awt...



now in other class i have this:



I dont understand the logic behind it.?!?!?!

the View class is like that:




how would i do it right?
 
Rob Spoor
Sheriff
Posts: 21095
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oleg Glizerin wrote:I need to draw this using swt and not awt...

Sorry, I missed that part...
 
Oleg Glizerin
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
some one know?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!