Changing TextArea UI with PGS Look and feel

I am using PGS look and feel. The Characters in Textfiled and text Are are not displayed properly.
I have changed textfield ui as

class TextFieldLookNFeel extends PgsLookAndFeel
{
      protected void initClassDefaults(UIDefaults table)
      {
            super.initClassDefaults( table );
            //Object[] defaults = { "TextFeildUI", "YourTextFieldUI" } ;
            Object[] defaults = {"TextFieldUI","com.sun.java.swing.plaf.windows.WindowsTextFieldUI"};
            table.putDefaults(defaults);
      }
}

I am using TextFieldLookNFeel  as theme.
Now I want to do the same for TextArea

Thanks
sangameshrhAsked:
Who is Participating?
 
ksivananthCommented:
trye this,


            Object[] defaults = {"TextFieldUI","com.sun.java.swing.plaf.windows.WindowsTextFieldUI",
                                             {"TextAreaUI","com.sun.java.swing.plaf.windows.WindowsTextAreaUI"};
            table.putDefaults(defaults);
0
 
Dejan PažinHead of SW DevelopmentCommented:

How do you set look and feel? I tried your code and characters work fine in both JTextField and JTextArea.
0
 
sangameshrhAuthor Commented:
UIManager.setLookAndFeel(new TextFieldLookNFeel());

It is working fine with JTextField but not JTextArea
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
Dejan PažinHead of SW DevelopmentCommented:

I'll need your code to see the problem. It works fine when i try this.

0
 
Dejan PažinHead of SW DevelopmentCommented:

What you posted doesnt compile. Did you mean:

            Object[] defaults = {"TextFieldUI","com.sun.java.swing.plaf.windows.WindowsTextFieldUI"};
            table.putDefaults(defaults);
            Object[] defaults2 = {"TextAreaUI","com.sun.java.swing.plaf.windows.WindowsTextAreaUI"};
            table.putDefaults(defaults2);

I tried that, and it works. I'll need more of your code.

0
 
ksivananthCommented:
its a typo, it should have been typed as

Object[] defaults = {"TextFieldUI","com.sun.java.swing.plaf.windows.WindowsTextFieldUI",
                                "TextAreaUI","com.sun.java.swing.plaf.windows.WindowsTextAreaUI"};


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.