42 |
import java.awt.Component; |
import java.awt.Component; |
43 |
import java.awt.Font; |
import java.awt.Font; |
44 |
import java.awt.Toolkit; |
import java.awt.Toolkit; |
45 |
|
import java.net.URL; |
46 |
|
|
47 |
import javax.swing.border.Border; |
import javax.swing.border.Border; |
48 |
|
import javax.swing.plaf.IconUIResource; |
49 |
import javax.swing.plaf.UIResource; |
import javax.swing.plaf.UIResource; |
50 |
import javax.swing.text.JTextComponent; |
import javax.swing.text.JTextComponent; |
51 |
|
|
202 |
*/ |
*/ |
203 |
public static Object makeIcon(Class baseClass, String gifFile) |
public static Object makeIcon(Class baseClass, String gifFile) |
204 |
{ |
{ |
205 |
return null; |
final URL file = baseClass.getResource(gifFile); |
206 |
|
return new UIDefaults.LazyValue() |
207 |
|
{ |
208 |
|
public Object createValue(UIDefaults table) |
209 |
|
{ |
210 |
|
return new IconUIResource(new ImageIcon(file)); |
211 |
|
} |
212 |
|
}; |
213 |
} |
} |
214 |
|
|
215 |
/** |
/** |