Solved

How to ....

Posted on 2006-11-06
4
219 Views
Last Modified: 2010-03-31
Hi,

just enquiring how do i do the following:

1. Change font size of a JList
2. Change font size of a JTable
3. set the Text in JButton such that it can wrap. E.g. instead of
|-------------|
|                |
|My Button  |
|                |
|-------------|

the text is set to:

|-------------|
|                |
|      My      |
|   Button    |
|-------------|

0
Comment
Question by:amai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
ID: 17882026
1 & 2 x.setFont(newFont)

3 button.setText("<html>My<br>Button</html>");


0
 

Author Comment

by:amai
ID: 17882138
Hi, thanks for the quick response.. I tried x.setFont(new Font) for my jList, but it didn't work. It's being placed on a pane, and the pane actually setViewportView with this jlist. Does this impact?
0
 

Author Comment

by:amai
ID: 17882437
oops, i know where's the fault... thanks for the response. You are correct :)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17882502
:-)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question