开发者

porting a java6 swing code to java5

开发者 https://www.devze.com 2023-02-25 12:27 出处:网络
I have some code 开发者_如何学Gothat uses JTabbedPane java 6 extension (it uses the method indexOfTabComponent(Component))

I have some code 开发者_如何学Gothat uses JTabbedPane java 6 extension (it uses the method indexOfTabComponent(Component)) How can I make this code compatible with java 5?

Please don't tell me to upgrade to java 6, I can't.


One option would be to extend JTabbedPane circa 1.5 and implement indexOfTabComponent(Component) in your extension, then switch your code to use your new extension.


You can do a lot with insertTab(), as seen in this example.

0

精彩评论

暂无评论...
验证码 换一张
取 消