• Post Reply Bookmark Topic Watch Topic
  • New Topic

swing components resizing

 
jignesh patel
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)how can i change the font size of table header. i am able to change the fontsize of data in all the rows. but not the table header.
2) how can i change the fontsize of items into a combo box.(those items which are not selected into a combo box)
3) how can i change the size of JButtons in the JOptionPane. even while changing the size of optionpane the button size remains the same.
 
deekasha gunwant
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi jignesh ,
for ur first ques. use following code to change the font of ur table header.

boldFont = new Font("Dialog",....);
JTableHeader head =runRateGrid.getTableHeader();
head.setFont(boldFont);

for ur second ques.

use setRenderer(ListCellRenderer aRenderer);
i.e. u create a ListCellRenderer and associate it with ur combobox.

for third ques. of urs

I don't think u can change the button size of JOptionPane.
I may be wrong.do correct me.

regards
deepti


[This message has been edited by deekasha gunwant (edited August 29, 2000).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!