0

I have a JComboBox that is declared with:

JComboBox<String> toneList = new JComboBox<>(tones); //tones is a String[] list

And is added with:

panel.add(toneList);
window.add(panel);

But the issue is that it looks old and just generally looks bad. This is what it currently looks like.

image

I want it to look like this, which looks more modern.

image

Is there a Look and Feel that achieves this or is the second one actually something else?

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
deNoww
  • 83
  • 8

1 Answers1

2

Your second screenshot looks like a JComboBox with a smaller font than the UIManager default of 13 points. Starting from this example, you can change the size like this:

public static void main(String[] args) {
    UIManager.put("ComboBox.font", new JComboBox().getFont().deriveFont(12f));
    …
}

image

trashgod
  • 203,806
  • 29
  • 246
  • 1,045