porting a java6 swing code to java5
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.
精彩评论