| || |
Does TC recognize colors?
I am working with javax.swing.choosecolor dialog. when i select color by writing code "chooser.setColor(Color.red);" , it is giving an error message "red is null or not an object" .Can any body help me how can i set and get color from choose color dialog.Do I need to add "javax.swing.choosecolor" property in object mapping > swing objects for TC to recognize individual colors? Please find the attached screen shot of the color chooser window.
Re: Does TC recognize colors?
I suppose that you are actually talking about the "javax.swing.colorchooser" controls, am I right? In this case, try setting the color as in the following sample script:
var JDialog = <jColorChooser>;
var colorObj = JDialog.getColor();
Before running the script, replace "<jColorChooser>" with the name of an actual object.