Results 1 to 2 of 2
  1. #1
    pj6444 is offline Senior Member
    Join Date
    Jan 2013
    Posts
    165
    Rep Power
    2

    Default Error on Set Font of JTextArea

    Why is this giving me the error: "The method setFont(Font) in the type JTextArea is not applicable for the arguments (String,int,int)"

    Java Code:
    public static void changeFont(int i) {
    		textArea.setFont("Serif",Font.PLAIN,i);
    	}
    Thanks for your help.

  2. #2
    pj6444 is offline Senior Member
    Join Date
    Jan 2013
    Posts
    165
    Rep Power
    2

    Default Re: Error on Set Font of JTextArea

    Never mind I found a silly problem. I forgot the newFont()!!!!

Similar Threads

  1. JTextArea error
    By wndtjr2 in forum New To Java
    Replies: 1
    Last Post: 11-09-2011, 08:01 PM
  2. Internal error-- Cannot Instantiate Font Class??
    By MatthewC.Dowell in forum New To Java
    Replies: 1
    Last Post: 05-29-2011, 08:00 PM
  3. Replies: 0
    Last Post: 08-18-2010, 11:31 AM
  4. Replies: 5
    Last Post: 04-25-2009, 09:00 PM
  5. Help with save font information in jtextarea
    By valery in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 09:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •