Paint « JCheckBox « Java Swing Q&A





1. Custom JCheckBox Painting--UI Delegate    coderanch.com

Hi, I need to create a checkbox that represents 3 states (checked, gray-checked, unchecked). Is it absolutely necessary to delve into the UI-Delegate to accomplish this? If so what methods would I have to override? I only want to repaint the inner portion of the checkbox, not the whole background. I know I could just use gif icons and swap them, ...

2. Getting error while trying to access Checkbox object from paint method    coderanch.com

Hi Everyone, I am relatively new to Java programming. I have to design a GUI. I have one sample code which is throwing errors and I am not able to get rid of them.Here is my code - -------------------------------------------------------------------------- package sample; import java.awt.*; import java.awt.event.*; public class CheckboxSample extends Frame implements ItemListener , WindowListener { String msg=""; /** * */ ...