• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Can't create a line with ObjectDraw

Shadow Conception

Golden Member
This is my code:

import java.util.*;
import java.awt.*;
import objectdraw.*;

public class Line extends FrameWindowController
{
public void begin()
{
Line bob = new Line(1, 2, 3, 4, canvas);
}

}

'the hell is wrong with it? An error comes up saying this: cannot find symbol - constructor Line(int, int, int, int, objectdraw.DrawingCanvas)

The stupid thing is that if I replace Line with FramedRect or FilledRect, it works perfectly. Does "Line" not exist in my version of ObjectDraw or something? I'm using BlueJ, btw.
 
I don't know anything about objectdraw from experience, just looking at what google gave me.
Looking at the API:

Line
Version:
1.1.2 released July 2006

FilledRect
Version:
1.1.2 released July 2006

So it would seem that if you have FilledRect then Line should be there as well. Is it possible Java is getting confused with Line from another package? How about trying:

objectdraw.Line bob = new objectdraw.Line(1, 2, 3, 4, canvas);

Edit:
Or try this:

System.out.println("Line is: " + Line.class);
 
Back
Top