What do you recommend for writing a 2D array of pixels to the screen?
My first thought is some SWT binding, but are there any others? Processing perhaps?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s not too hard in Swing – you can cut and paste the below. You could simplify it a bit if you don’t want colours or the ability to draw to any size window, or if it’s always the same size.
Define a Panel class:
Then make a Swing app:
Your data could be something like
Which would give you:
You can easily use a
mapfunction on your existing array to map it to colours.