// ====================================================================== // The following are GUI update routines // ====================================================================== // Function to repaint GUI components void repaint(){ paintComponent(displayPanel); // Repaint the color display panel paintComponent(window); // Repaint the main window } // Function to set the color of the display panel void setDisplayColor(int color[]){ int fgColor[] = {0, 0, 0, 0}; // Foreground color (not used for panels) setComponentColor(displayPanel, fgColor, color); // Set color to the display panel repaint(); // Redraw the screen } // Function to set the RGB input fields void setRgbField(string r, string g, string b){ setComponentText(redField, r); // Set value to RED field setComponentText(greenField, g); // Set value to GREEN field setComponentText(blueField, b); // Set value to BLUE field repaint(); // Redraw the screen } // Function to set the CODE input field private void setCodeField(string code){ setComponentText(codeField, code); // Set value to CODE field repaint(); // Redraw the screen }