I am trying to implement CPU scheduling algorithms ... i am using java swing
(not a runtime design)
This is how my main form looks:
I've designed it by dragging components from swing containers/controls/menus and dropping them on a JFrame
.
I've a JPanel
on my main-panel of FCFS tab. I want to draw a 'Gantt Chart' on that panel (as it's shown in picture). I've read so many tutorials and implemented many examples on drawing lines but i don't know how to @Override
painComponent()
method in my code, because all the variables and methods are generated automatically (am using NetBeans IDE), and am unable to locate my JPanel
(on which i want to draw lines).
I want to draw a "Gantt Chart" like this one. It will be generated automatically when user enters CPU burst for a number of processes and presses "Calculate" button. The current chart will be generated if user enters '10 ms' burst for each process.
In this picture i've tried to explain the sequence of components, i've added on my JFrame, along with their variable names.
I'm searching for the solution from last 15 days ... but am stuck in this problem ... please please help me to solve this problem.
Please please please help me...