In Widget class getLookup method returns empty lookup, and there is no way to set it, or put something in that lookup.
Is there a use case where this is desired behaviour, and instance of Widget class is used?
In most examples I saw using IconWidget or LabelWidget (Widget subclasses), or extending Widget class, adding Lookup field and overriding getLookup method so that it returns that field.
It would make more sense to have constructor which accepts lookup param like in Node class http://bits.netbeans.org/dev/javadoc/org-openide-nodes/org/openide/nodes/Node.html#Node%28org.openide.nodes.Children,%20org.openide.util.Lookup%29
Please let me know what you thnk about this. Thanks.
1. The method is not final, so particular widgets can already supply a different lookup. There is no need for a new constructor that I can see.
2. doc-files/documentation.html says that getLookup is not used at the moment anyway. I am not aware of any calls to, or overrides of, this method.