- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {SimpleDateFormat s =
String pattern;new SimpleDateFormat(pattern)
String template;Locale locale;new SimpleDateFormat(template, locale)
new SimpleDateFormat()
- Smart code suggestions by Codota
}
@Override protected void onSelectAmbientColor() { Color color = JColorChooser.showDialog(this, "Select color", getLblAmbientColor().getBackground()); getLblAmbientColor().setBackground(color); }
private void fillForm(LightConfiguration light) { getDirectionText().setText("" + light.getDirection()); getAngleText().setText("" + light.getAngle()); getLblAmbientColor().setBackground(light.getAmbientColor()); getLblDiffuseColor().setBackground(light.getDiffuseColor()); }
@Override protected void onOk() { String directionText = getDirectionText().getText(); String angleText = getAngleText().getText(); Color ambientColor = getLblAmbientColor().getBackground(); Color diffuseColor = getLblDiffuseColor().getBackground(); Double direction = ParseUtil.parseDouble(directionText); Double angle = ParseUtil.parseDouble(angleText); if (validate(direction, angle)) { lightService.save(new LightConfiguration(direction, angle, ambientColor, diffuseColor)); // dispose(); } }