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

Sluggish Java Swing Gui

Options
  • 22-03-2004 2: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 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