public void actionPerformed(ActionEvent e){
        if(e.getSource().equals(button)){
            try{
            writer.write(""+rng.nextInt(254)+" "+rng.nextInt(254)+" "+rng.nextInt(254));
            writer.newLine();
            writer.flush();
          /*  String line = reader.readLine();
            System.out.println(line);
            String[] rgb = line.split(" ");
            button.setBackground(new Color(Integer.parseInt(rgb[0]),Integer.parseInt(rgb[1]),Integer.parseInt(rgb[2])));
            */
            
            }
            catch(IOException a){
                    System.out.println(a.getMessage());
                    }
        }

    }         public static void main(String[] args){