NB: I have never used swing before, neither graphics 2D, and I don't program very much...
What I am trying to do is to make a program which takes an array/vector as input. This array, where each index 0,1,2 etc holds either zero or one (int) - which represents "no activity" or "activity" in minute 0,1,2 etc...
I want the program to draw a discontinuous straight horizontal line - representing "activity" vs "no activity" as a function of time - based on the array that was taken as input. And this should pop up in a panel when I run the code.. The Idea is to show activity/no activity as a function of time, so the line would preferably be shown in a chart ( x-axis & y-axis )... And there will be several of these discontinuous lines above each other - for comparison of different cases.
I have tried for a while to look at examples using swing and graphics 2D, but as I have very limited amount of time - I could really need some help ..
Any code that:
- creates a panel, frame etc - where I "easily" can see where I can insert my graph: that is a panel which is ready to display the graph I will make
- draw a graph of discontinuous horizontal lines based on an array as described above
...is immensely appreciated :)
added from comment:
Sorry - did not finish my answer :) I could sure try to learn how to use all the different things in Swing frames, panels etc.. But at the moment my main goal is to finish my assignment for school - which is the visualization of data itself - and they do not really care how you get there, the most important thing is that it visualizes something useful... So I thought that I could decrease the time I had to spend on this if I got some code which could get me started - and not have to learn how it all works first.