I have a working JColorChooser dialog except it is not located where I want it. I cannot figure out how to set the location without getting a static call warning from my IDE (Eclipse). This seems like it should be a simple thing to do but I've learned that few things in java are simple. This is the code in question:
The statement 'Color color=...' gets the warning that it needs to be called in a static way. How do I call 'setlocation' and still call 'showDialog in a static way? TIA.import java.awt.Color; import javax.swing.JColorChooser; public class ColorChooser { public Color getColor() { JColorChooser chooser=new JColorChooser(); chooser.setLocation(0, 0); Color color=chooser.showDialog(null,"Choose color",Color.RED); return(color); } }