Thread View: aus.computers.java
1 messages
1 total messages
Started by Michael Rowlands
Mon, 28 Jun 1999 00:00
Getting a TextArea's font and font size
Author: Michael Rowlands
Date: Mon, 28 Jun 1999 00:00
Date: Mon, 28 Jun 1999 00:00
23 lines
1638 bytes
1638 bytes
Hi,
How do you capture the font, size and style of a TextArea?
I have tried
if (cmd.equals(fontPlain))
{
// returns String representing the logical name of the Font.
String fontAtChange = textArea.getName();
textArea.setFont(new Font(fontAtChange, Font.PLAIN, 20));
textArea.setText(fontAtChange);
}
However it just gives me "text0" instead of my default which I defined as
textArea.setFont(new Font(cou, Font.PLAIN, 12));
// cou is defined as "fontLogicalName.add(new MenuItem(cou));" which in turn
is taken from
"private String cou = new String("Courier");"
Can anybody Help I am desperate
Cheers
Michael Rowlands
michaelrowlands@bigfoot.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads