Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Knute Johnson Newsgroups: comp.lang.java.programmer Subject: UIDefaults key? Date: Wed, 06 Aug 2014 09:25:53 -0700 Organization: A noiseless patient Spider Lines: 14 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 6 Aug 2014 16:25:50 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="aba33539224e5c782fe0c4053f7756fd"; logging-data="1482"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19yHEwl95ATK08a84dkqT4+" User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 Cancel-Lock: sha1:8lxvapwA5m7J3ZYvW+lPxxgxRgU= Xref: csiph.com comp.lang.java.programmer:29575 JComponent has a method, getUIClassID(), to return the UIDefaults key for the ComponentUI subclass. A JTextField returns a key of TextFieldUI. A typical subclass is javax.swing.plaf.metal.MetalTextFieldUI. All the interesting details in the UIDefaults however use keys such as TextField.foreground, TextField.border, TextField.margin etc. Is there any way to get the prefix, TextField, from the component other than stripping the UI off the end of the UIClassID? Thanks, -- Knute Johnson