X

Geertjan's Blog

  • January 11, 2011

java.awt.Color and OutlineView

Geertjan Wielenga
Product Manager
Kind of cool to learn that when you use java.awt.Color as one of the fields in your POJO, that you can do this in your TopComponent:
OutlineView ov = new OutlineView("Cars");
ov.getOutline().setRootVisible(false);
ov.setPropertyColumns(
"year","Year",
"color","Color"
);
add(ov, BorderLayout.CENTER);

And then you'll have the color chooser available as the field's editor when you run the application:

Join the discussion

Comments ( 1 )
  • Henk Wednesday, January 12, 2011

    Why is the example color chooser truncated at the edges?


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.