Results 1 to 3 of 3
  1. #1
    new2java2009 is offline Member
    Join Date
    Aug 2009
    Posts
    60
    Rep Power
    0

    Default Text is not greyed out on a disabled button

    Hi,

    I have a button which has multiple lines text. When I set this button disabled (button.setEnable(false)), the text doesn't seem to be greyed out.

    Any idea why?

    Thanks!

    Java Code:
    private static final String INPUT_RECORDS = "<html><center>"+"Input"+"<br>"+"Records"+"</center></html>";
    
    button = new JButton();
    button.setLayout(new BorderLayout());
    button.setText(INPUT_RECORDS);

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    786
    Rep Power
    5

  3. #3
    new2java2009 is offline Member
    Join Date
    Aug 2009
    Posts
    60
    Rep Power
    0

    Default Re: Text is not greyed out on a disabled button

    Thank you!! Got it.

Similar Threads

  1. how to enable only text on disabled jButton?
    By sandeep43 in forum NetBeans
    Replies: 6
    Last Post: 06-22-2011, 07:34 AM
  2. tooltip should be visible when button disabled
    By Sureshgurram in forum SWT / JFace
    Replies: 1
    Last Post: 11-23-2010, 09:58 AM
  3. how to disabled button...?
    By mlibot in forum New To Java
    Replies: 0
    Last Post: 10-09-2009, 08:36 AM
  4. button is not getting disabled on onload event
    By Harshada in forum Advanced Java
    Replies: 2
    Last Post: 03-08-2009, 02:03 PM
  5. Text color in disabled componentes
    By saul_2110 in forum AWT / Swing
    Replies: 8
    Last Post: 12-13-2008, 05:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •