Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Text in canvas that uses (setLayout(null)) to define where it appears.

843805Dec 1 2005 — edited Dec 1 2005
I want to display 8 single digits from 1 to 8 in a canvas that I can set the position of in terms of coordinates, hence the layout manager of (setLayout(null)) that has been suggested to me previously.

I've already got:

frame = new JFrame();
canvas = new CanvasPane();
frame.setTitle(title);

canvas.setPreferredSize(new Dimension(width, height));
backgroundColour = bgColour;

Container contentPane = frame.getContentPane();
contentPane.setLayout(new BorderLayout());
contentPane.add(canvas, BorderLayout.CENTER);
contentPane.add(statusLabel, BorderLayout.SOUTH);

But I don't know how to do the text so I can't continue.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2005
Added on Dec 1 2005
2 comments
86 views