Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #29575

UIDefaults key?

From Knute Johnson <eternal@knutejohnson.com>
Newsgroups comp.lang.java.programmer
Subject UIDefaults key?
Date 2014-08-06 09:25 -0700
Organization A noiseless patient Spider
Message-ID <lrtkud$1ea$1@dont-email.me> (permalink)

Show all headers | View raw


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

Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

UIDefaults key? Knute Johnson <eternal@knutejohnson.com> - 2014-08-06 09:25 -0700
  Re: UIDefaults key? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-08-06 13:31 -0400
    Re: UIDefaults key? Knute Johnson <eternal@knutejohnson.com> - 2014-08-06 11:17 -0700
      Re: UIDefaults key? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-08-06 14:38 -0400
        Re: UIDefaults key? Knute Johnson <eternal@knutejohnson.com> - 2014-08-06 13:00 -0700
          Re: UIDefaults key? Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-08-06 16:52 -0400

csiph-web