Results 1 to 2 of 2
  1. #1
    diggitydoggz is offline Member
    Join Date
    Dec 2008
    Posts
    55
    Rep Power
    0

    Default changing font size

    Hey guys. For a project that I'm doing just for practice, I am making a very simple notepad type application. In my frame I have a little text field at the bottom which the user can use to change font size. I want to make it so that the font in the textArea changes to whatever value I put into the font textfield without me having to click on any buttons - just typing in a new value should trigger the font change. I tried using a standard actionListener on the text field but it didn't work - I've been unable to discover a method to do this. Does anybody have thoughts on how I might be able to pull this off?

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    tried using a standard actionListener on the text field but it didn't work
    Press the enter key for this to work.
    just typing in a new value should trigger the font change
    DocumentListener

Similar Threads

  1. Changing size of Array
    By ravian in forum New To Java
    Replies: 3
    Last Post: 06-05-2012, 09:17 PM
  2. Replies: 5
    Last Post: 04-25-2009, 09:00 PM
  3. how to set font size for a xml value
    By bala_kj in forum Advanced Java
    Replies: 3
    Last Post: 04-01-2008, 12:00 PM
  4. Swing - Changing component default font
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-11-2008, 11:52 PM
  5. JTable with Font
    By Rama Koti Reddy in forum AWT / Swing
    Replies: 1
    Last Post: 12-12-2007, 06: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
  •