-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.1.8
-
sparc
-
solaris_2.6
JDK Version: jdk118
OS: Solaris 2.6
Locale: C, zh
Choice's content can not be displayed in the Frame, and sometimes after
remove the items of the Choice, the Choice will be displyed just as
a short line, we can not see anything in it. Following is a short
program to reproduce it.
============================CheckChoice.java============================
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class CheckChoice extends Thread {
Choice choice1;
Choice choice2;
Choice choice3;
int itemCount = 0;
static CheckChoice choiceThread;
public static void main(String args[]) {
choiceThread = new CheckChoice();
choiceThread.start();
}
public CheckChoice() {
Frame f = new Frame("Check Choice");
f.setLayout(new BorderLayout());
choice1 = new Choice();
choice2 = new Choice();
choice3 = new Choice();
f.add(choice1, BorderLayout.NORTH);
f.add(choice3, BorderLayout.CENTER);
f.add(choice2, BorderLayout.SOUTH);
f.pack();
f.show();
}
public void run() {
while (true) {
if (choice1 != null && itemCount < 40) {
choice1.add("I am Choice, yes I am : " + itemCount * itemCount);
choice2.add("I am the same, yes I am : "+ itemCount * itemCount);
choice3.add("I am the same, yes I am : "+ itemCount * itemCount);
itemCount ++;
}
if (itemCount >= 20 && choice1 != null && choice1.getItemCount() > 0) {
choice1.removeAll();
choice2.removeAll();
choice3.removeAll();
itemCount = 0;
}
//System.out.println("iiiiiiiii " + itemCount);
try {
Thread.sleep(1000);
} catch (Exception ex) {
}
}
}
}
==============================================================================
OS: Solaris 2.6
Locale: C, zh
Choice's content can not be displayed in the Frame, and sometimes after
remove the items of the Choice, the Choice will be displyed just as
a short line, we can not see anything in it. Following is a short
program to reproduce it.
============================CheckChoice.java============================
import java.awt.*;
import java.awt.event.*;
import java.io.*;
public class CheckChoice extends Thread {
Choice choice1;
Choice choice2;
Choice choice3;
int itemCount = 0;
static CheckChoice choiceThread;
public static void main(String args[]) {
choiceThread = new CheckChoice();
choiceThread.start();
}
public CheckChoice() {
Frame f = new Frame("Check Choice");
f.setLayout(new BorderLayout());
choice1 = new Choice();
choice2 = new Choice();
choice3 = new Choice();
f.add(choice1, BorderLayout.NORTH);
f.add(choice3, BorderLayout.CENTER);
f.add(choice2, BorderLayout.SOUTH);
f.pack();
f.show();
}
public void run() {
while (true) {
if (choice1 != null && itemCount < 40) {
choice1.add("I am Choice, yes I am : " + itemCount * itemCount);
choice2.add("I am the same, yes I am : "+ itemCount * itemCount);
choice3.add("I am the same, yes I am : "+ itemCount * itemCount);
itemCount ++;
}
if (itemCount >= 20 && choice1 != null && choice1.getItemCount() > 0) {
choice1.removeAll();
choice2.removeAll();
choice3.removeAll();
itemCount = 0;
}
//System.out.println("iiiiiiiii " + itemCount);
try {
Thread.sleep(1000);
} catch (Exception ex) {
}
}
}
}
==============================================================================