Results 1 to 3 of 3
  1. #1
    itaipee is offline Member
    Join Date
    Dec 2008
    Posts
    99
    Rep Power
    0

    Default change text size in all GUI components

    Hi

    I want to change the font size in all the gui component - from the jLabels to the jTable .
    I don't want to change each gui component - but change the default in te begining of the program - is there someting like that ?

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,233
    Rep Power
    6

    Default

    Check out the UIManager. It defines properties of each component, including the font. So iterate through all the values. Find a property that ends in "font" and then you can update the property to use your desired font.

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    If you set all the font attributes of the components to null, then they will all inherit the font from the base container. So, just set the font of the container. I believe the default is to inherit.

    Size and things like bold, italic, are inherit attributes of the font, so everything will have exactly the same font. Of course, that may not be a problem.

Similar Threads

  1. JFrame 's components size and location problem
    By petrosgraf in forum Threads and Synchronization
    Replies: 5
    Last Post: 04-18-2009, 02:24 AM
  2. Replies: 4
    Last Post: 02-22-2009, 06:31 AM
  3. Replies: 1
    Last Post: 06-06-2008, 07:55 AM
  4. Listener for JFrame size change
    By Thez in forum AWT / Swing
    Replies: 10
    Last Post: 02-14-2008, 03:10 PM
  5. gridbaglayout: increase/decrease size of components.
    By newtojava7 in forum New To Java
    Replies: 2
    Last Post: 01-28-2008, 07:22 AM

Posting Permissions

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