I was trying to convert this code from .NET to Java, but I couldn't convert these 4 lines. Please someone give me a suggestion how to convert this code:
this.pbSubSequence = (Image) new Bitmap(this.pbSubSequence.getWidth(),
this.pbSubSequence.getHeight());
Image image = this.pbSubSequence.Image;
Graphics graphics = Graphics.FromImage(this.pbSubSequence.Image);
(pbSubSequence
is a panel; I have four panels in this code and I have to draw sort of graph of ecg in all four of them which will be done by:
g.draw(new Line2D.Float(100f,100f,500f,500f)
(this line would run in a for
loop)
Can someone help me write these lines in Java?