Why won't this TextArea return to non-Bold format, or is Font.PLAIN just like an "add-on"?
- by JIM
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();
}