Help setting the some font properties of a TitledBorder's title

Hi, what's wrong with my code? I'm still learning Java, so my problem could arise from something different from a swing misunderstanding.

I'm trying to set to green the color of a TitledBorder object's title and a bold weight, but Java compiler gives:

PhoneBookGUI.java:114: cannot resolve symbol

symbol : method createTitledBorder (javax.swing.border.Border,int,int,java.awt.Font,java.awt.Color)

location: class javax.swing.BorderFactory

tb = BorderFactory.createTitledBorder(border, TitledBorder.LEFT, TitledBorder.TOP, font, green);

The ^ is under the first dot (between BorderFactory and createTitledBorder)

HashMap fontAttributes =new HashMap();

fontAttributes.put("WEIGHT", TextAttribute.WEIGHT_BOLD);

Border border;

border = BorderFactory.createEmptyBorder();

Font font =new Font(fontAttributes);

Color green = Color.GREEN;

TitledBorder tb;

tb = BorderFactory.createTitledBorder(border, TitledBorder.LEFT, TitledBorder.TOP, font, green);

Thanks!

[1147 byte] By [__paolo__a] at [2007-10-3 5:14:13]
# 1
Has nothing to do with Swing. It just a common problem of incorrect method signatures.You are passing parameters of type:(Border,int,int,Font,Color)Read the API, it would appear you are missing the "String title" paramenter, which should be the second parameter.
camickra at 2007-7-14 23:20:43 > top of Java-index,Desktop,Core GUI APIs...