Java--I'm putting together a GUI interface for homework. What component do I use to make this text box? [pic]?

StackOverflow https://stackoverflow.com/questions/22947529

  •  30-06-2023
  •  | 
  •  

Вопрос

http://i.imgur.com/ibxDyW5.png

The picture is the example provided. I'm assuming when I slide the slider the text in the grey box will change based on the action listener's logic. I know how to do this, I just don't know what the grey box is called to initialize it. Is that a JTextField?

Это было полезно?

Решение

That is a JTextField but is read-only. field.setEditable(false); is what you want to use after you have initialized the JTextField. See here for an example.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top