N
Newbie
I'm passing the param "name" from a seperate class into my new class
where the majority of my code lies
I would like to have a JLabel within the titlebar of my new program
that can be changed dynamically using the setText() through an
actionListener() using a combobox as the firing component.
however, when i try this the title bar fills with the JLabel constraints
as apposed to the text that it holds
Can some kind soul point out the obvious to me as my head is starting
to bleed from hitting against the brick wall
Code is below:
------------------------------------------
public void newName(String name)
{
title = new JLabel(name);
setTitle(""+getContentPane().add(title));
return;
}
------------------------------------------
where the majority of my code lies
I would like to have a JLabel within the titlebar of my new program
that can be changed dynamically using the setText() through an
actionListener() using a combobox as the firing component.
however, when i try this the title bar fills with the JLabel constraints
as apposed to the text that it holds
Can some kind soul point out the obvious to me as my head is starting
to bleed from hitting against the brick wall
Code is below:
------------------------------------------
public void newName(String name)
{
title = new JLabel(name);
setTitle(""+getContentPane().add(title));
return;
}
------------------------------------------