How to ....

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    |
|-------------|

amaiAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
CEHJConnect With a Mentor Commented:
1 & 2 x.setFont(newFont)

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


0
 
amaiAuthor Commented:
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
 
amaiAuthor Commented:
oops, i know where's the fault... thanks for the response. You are correct :)
0
 
CEHJCommented:
:-)
0
All Courses

From novice to tech pro — start learning today.