Why won't this TextArea return to non-Bold format, or is Font.PLAIN just like an "add-on"?

Posted by JIM on Stack Overflow See other posts from Stack Overflow or by JIM
Published on 2010-05-27T00:52:02Z Indexed on 2010/05/27 1:31 UTC
Read the original article Hit count: 244

Filed under:
|
|
|
|

I am trying to Create a Simple Notepad in Java, i would post the full code but i didnt think it would be necessary since the problem is here(i think). Please Help.

    if(cb.getSelectedItem().equals("Plain")){
  MainText.setFont(new Font(getFontName(MainText),Font.PLAIN,getFontSize(MainText)));}

here are the above used methods

public int getFontSize(TextArea t){
    return t.getFont().getSize();
}
public String getFontName(TextArea t){
    return t.getFont().getFontName();
}
public int getFontStyle(TextArea t){
    return t.getFont().getStyle();
}

© Stack Overflow or respective owner

Related posts about java

Related posts about gui