Solved

How to ....

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Where to store the queries for modification of table 4 63
javap bin 2 36
varialbe initialization 11 33
null output 3 25
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…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.

803 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