0

为什么下面的方法不是静态的?

public Insets getBorderInsets(Component c)

它返回所提供组件的插图。但由于它不是静态的,我需要创建一个边框对象来调用它。重点是什么?我错过了什么吗?

它应该使用的方式:

Border  b = BorderFactory.createRaisedBevelBorder();
Inset i = b.getBoderInsets(someComponent);
4

0 回答 0