Solved

How to ....

Posted on 2006-11-06
4
220 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

615 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