Results 1 to 7 of 7
  1. #1
    sandeep43 is offline Member
    Join Date
    May 2011
    Posts
    97
    Rep Power
    0

    Question how to enable only text on disabled jButton?

    Hi,

    i have a JFrame on which i have placed a button called "Next", this button is disabled initially, after he does few operations it ll be enabled, but my problem is when the button is disabled the text on button is not displayed, it is blank. Please help me out.


    Regards
    Sandeep

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,196
    Rep Power
    19

    Default

    Quote Originally Posted by sandeep43 View Post
    when the button is disabled the text on button is not displayed
    That's not normal. Are you using a third party LookAndFeel?

    To get better help sooner, post a SSCCE that clearly demonstrates your problem.

    db
    Last edited by DarrylBurke; 06-21-2011 at 11:53 AM.

  3. #3
    sandeep43 is offline Member
    Join Date
    May 2011
    Posts
    97
    Rep Power
    0

    Default

    Hi

    Im not using any third party LookAndFeel.

    in my second frame it is proper, where as in my first frame it is not displaying, i removed the button and also re-did it again, still not working.

    Not only that button, any button if i disable within that 1st frame, it is not displaying.

    Regards
    Sandeep

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,196
    Rep Power
    19

    Default

    So where's that SSCCE?

    db

  5. #5
    sandeep43 is offline Member
    Join Date
    May 2011
    Posts
    97
    Rep Power
    0

    Default

    Hi

    I did not understand what should i do there, i read it but did not get even an idea as what should i do in tat link which you have given.

    Please explain me what should i do there, dont mind for asking like this, please help me out

    Regards
    Sandeep

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,196
    Rep Power
    19

    Default

    Give up now. If you can't understand the simple concepts outlined in the SSCCE web page, you're never going to be a programmer.

    db

  7. #7
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default

    SSCCE is Short Self Compilable Correct Example, db is asking you to create a small program that describe your problem so we can run it and see the problem.

Similar Threads

  1. how to enable JButton?
    By sandeep43 in forum AWT / Swing
    Replies: 4
    Last Post: 05-30-2011, 06:50 AM
  2. JButton : Background and Text
    By Keys in forum AWT / Swing
    Replies: 1
    Last Post: 05-26-2011, 04:43 AM
  3. Replies: 4
    Last Post: 03-21-2009, 05:48 PM
  4. Text color in disabled componentes
    By saul_2110 in forum AWT / Swing
    Replies: 8
    Last Post: 12-13-2008, 05:37 AM
  5. Disabled JButton font color
    By p900128 in forum Advanced Java
    Replies: 1
    Last Post: 07-24-2008, 08:16 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
  •