This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to load/use default icons proveded by L & F? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to load/use default icons proveded by L & F?" Watch "How to load/use default icons proveded by L & F?" New topic
Author

How to load/use default icons proveded by L & F?

Matt Senecal
Ranch Hand

Joined: Dec 01, 2000
Posts: 255
I have what is probably a dumb question. I'm creating a custom dialog, but would like to use the default dialog icons provided by the look and feel (you know: the standard question mark, exclamation point, etc.)

Dumb question: how do I go about loading these default icons? I can't find them anywhere, nor can I find instructions for doing this anywhere. I need a kick in the right direction, and I'd appreicate any help.

Thanks!


There's nothing more dangerous than a resourceful idiot. ---Dilbert
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
I guess you are refering to the icons found in rt.jar: com/sun/swing/plaf/*/resources. From there you can load it as any other resource found in your classpath.

--
:alex |.::the_mindstorm::.


blog - InfoQ.com
 
Don't get me started about those stupid light bulbs.
 
subject: How to load/use default icons proveded by L & F?
 
Similar Threads
Get the standards icons
frame icons
Checkbox Icons
Regular Expression Matching in Eclipse 3.1
BufferedFileReader