Binding events between JComponent and ComponentUI delegate

前端 未结 1 1100
终归单人心
终归单人心 2021-01-22 00:54

I have started trying to create normal MVC Swing components. I have no problems with M and C, but V had thrown at me one problem which I cannot normally solve. The problem is: C

相关标签:
1条回答
  • 2021-01-22 01:04

    If you are writing your own JComponent subclass and want to allow for custom UI delegates, I'd start with Kirill Grouchnikov's How to Write a Custom Swing Component.

    If you are writing a composite that includes an existing JComponent subclass, such as JTextField, see if you can leverage the existing Action instances described in How to Use Key Bindings. ScrollAction is an example. You can learn the names of such actions from the component's source(s) or using @camickr's handy utility seen in the article Key Bindings.

    0 讨论(0)
提交回复
热议问题