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