Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么下面的方法不是静态的?
public Insets getBorderInsets(Component c)
它返回所提供组件的插图。但由于它不是静态的,我需要创建一个边框对象来调用它。重点是什么?我错过了什么吗?
它应该使用的方式:
Border b = BorderFactory.createRaisedBevelBorder(); Inset i = b.getBoderInsets(someComponent);