Random random = new Random(System.currentTimeMillis()); int rand = 1+ random.nextInt(1000);
TextField tx = new TextField(); tx.setBackground(Color.RED);
Random r = new Random(); int i = r.nextInt(1000) //产生一个1-1000的随机整数 TextArea ta = new TextArea(); ta.setBackground(Color c) //设置此文本组件的背景色。 //TextField 也有这个方法 LZ可以查查API
int rand = 1+ random.nextInt(1000);
TextField tx = new TextField();
tx.setBackground(Color.RED);
Random r = new Random();
int i = r.nextInt(1000)
//产生一个1-1000的随机整数
TextArea ta = new TextArea();
ta.setBackground(Color c)
//设置此文本组件的背景色。
//TextField 也有这个方法 LZ可以查查API