Skip to content

GridBagPanel is inflexible #136

Open
@scabug

Description

@scabug

Suggested changes:

  • Constraints should be a member of the companion object rather than the class, as there's no reason to tie constraint construction to a particular panel instance.

  • The add method should not be protected. That may have made sense if GridBagPanel is to be used only declaratively, but arguably this layout is too complex for that. Rather, it's a prime candidate for wrapping by some application-specific declarative framework, in which case the protection is just a pain.

  • The single mutating constraints object as used in the demo code is nasty. Ideally Constraints should be a case class with keyword arguments.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions