![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Hi, I am studying a long distance course in Java (I have no prior programming experience) and have come unstuck on what is probably rather a simple question: as follows: "Design and implement an applet which generates positive integers and displays each one together with a suitable message (i.e "The number is: 2") at 2 second intervals. The font should be Courier, bold, 24 points. Use clipping to minimise flicker" My answer thus far: import java.awt.*; public void init() { I am assuming thus far that I have got everything correct but I am having difficulty with working out the call to return the width in pixels and assign it to the stringwidth variable - I thought it might be: stringwidth = fm.getWidth(count); but this doesn't seem to work. Any assistance would be greatly appreciated.
Replies:
|
Sponsored Links
|