Answer the question
In order to leave comments, you need to log in
drawString not working when using Applet class
Hello.
It costs eclipse on Ubuntu 13. There is the following code:
package lab6;
import java.awt.*;
import java.applet.*;
public class Zvd_2 extends Applet {
/**
*
*/
private static final long serialVersionUID = 1L;
String sms;
public void init() {
setBackground(Color.black);
setForeground(Color.red);
sms = "метод init() -> ";
}
public void start() {
sms += "метод start() -> ";
}
public void paint(Graphics g) {
sms += " метод paint().";
g.drawString(sms, 100, 300);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question