Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Sluggish Java Swing Gui

  • 22-03-2004 1:14pm
    #1
    Closed Accounts Posts: 364 ✭✭


    Im having a small problem with my Swing app in java. i have defined a load of JLabels and embedded html into their string variables to colour their text. like so..

    JLabel one = new JLabel("<html><font color=blue>Press me</font></html>");

    And this has made the GUI much slower to repaint. Anyone have any other ways I can colour the text in my buttons?

    Ta


Comments

  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    I havn't used Java in ages but off the top of my head could you use a Font object to create coloured labels?


  • Registered Users, Registered Users 2 Posts: 3,548 ✭✭✭Draupnir


    yeah mate, im positive you can change the color without HTML


  • Closed Accounts Posts: 302 ✭✭Auburn


    I think you can do something like:
    JButton butt= new JButton("butt");
    butt.setForeground(Color.blue);
    


Advertisement