cobbling a ComboBox
- From: Albretch Mueller <lbrtchx@xxxxxxxxx>
- Date: Mon, 23 Jun 2008 17:43:24 -0400
I have a JComboBox that looks like this:
http://www.geocities.com/tekmonk2005/pix/ComboBoxColors.jpg
I would like to use the color on the top title bar to use it as the
background of the selected item in the combobox, so it kind of looks like a
continuation of what was suggested in the title bar
But I don't know how to ask the UI Manager to give me the color of the top
title bar a JFrame uses. If you go:
UIManager.get("InternalFrame.borderColor")
you will get something like:
javax.swing.plaf.ColorUIResource[r=238,g=238,b=238]
Which is the grey color of the default Window background in the Metal L&F
Also I don't know how to only have the selection boldened (as in the window
bar), when the selection is made. If you go:
UIManager.put("ComboBox.font", new Font("Monospaced", Font.PLAIN +
Font.BOLD, 16));
The font stays bold all the time
I would like for it to be bold only when you select it
Is this possible?
thanx
lbrtchx
.
- Follow-Ups:
- Re: cobbling a ComboBox
- From: Daniele Futtorovic
- Re: cobbling a ComboBox
- Prev by Date: Struts and Java Interview Questions by Interview Panel Member:
- Next by Date: Re: cobbling a ComboBox
- Previous by thread: Struts and Java Interview Questions by Interview Panel Member:
- Next by thread: Re: cobbling a ComboBox
- Index(es):
Relevant Pages
|