Top.Mail.Ru
February 7th, 2006 - Java developers — LiveJournal
? ?

Java developers

February 7th, 2006
Image

12:20 pm - Image0olong - Swing display updating problems

Hi,

The latest version of my applet Resonata is having problems with updating the display in certain circumstances. In particular, one of the drop-down menus is long enough that it thinks it needs to scroll, and this frequently (a) comes up blank and/or (b) doesn't disappear fully after it closes, so the controls which are supposed to be underneath it stay hidden. Detaching the window also sometimes results in most of the controls not displaying properly. If I'm lucky they re-appear after a second or two though. Tooltips are also unreliable, sometimes appearing only as little blank grey boxes.

Has anyone else ever had problems like this? If so, how did you resolve them? It's a nightmare! Anyone got any clues about what might cause this sort of trouble? For what it's worth, I don't see it at all on my computer at home; I wasn't aware of it until someone emailed me about their problems, but now I find I get the same thing (but less drastic) on my computer at work.

(I never had these problems with the AWT...! :/)
 

09:32 pm - Imageantiall1124

i have a program i have to write involving arrays. i'm inexperienced with them, so bear with me if this question is a bit simple.

the program is a quiz that prompts the user for a certain number of questions, then the answer key. if i am supposed to enter the key as char values (i.e. abbcdbabdabd), how would i set it as the array length as the user's input and the actual value of each cell as the answers?

System.out.print("How many questions should the quiz be? ");
input = thing.nextInt();
int[] quiz = new int[input];
char[] quiz = new char[input];

would i just need the second array declaration to make the program work?
Powered by LiveJournal.com
Image